From 6cf6a799abf27ded354f24b76e3507d5f3dbfa7b Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Mon, 9 May 2022 08:57:03 +0200 Subject: [PATCH 01/26] [Tizen] Use docker images with Tizen Studio CLI (#17321) --- .github/workflows/examples-tizen.yaml | 2 +- build/config/tizen/config.gni | 18 ++++++++++++++++++ build/toolchain/tizen/tizen_toolchain.gni | 13 ++++++++----- scripts/build/builders/tizen.py | 17 +++++++++++++---- scripts/build/test.py | 3 ++- .../build/testdata/build_all_except_host.txt | 16 ++++++++-------- 6 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 build/config/tizen/config.gni diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index c813a176ff916b..663596a1dd27a7 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen:0.5.64 + image: connectedhomeip/chip-build-tizen:0.5.71 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/build/config/tizen/config.gni b/build/config/tizen/config.gni new file mode 100644 index 00000000000000..eb3be358bbf6a7 --- /dev/null +++ b/build/config/tizen/config.gni @@ -0,0 +1,18 @@ +# 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. + +declare_args() { + # Location of the Tizen SDK. + tizen_sdk_root = "" +} diff --git a/build/toolchain/tizen/tizen_toolchain.gni b/build/toolchain/tizen/tizen_toolchain.gni index 9f88753925a4dc..46833cea06942f 100644 --- a/build/toolchain/tizen/tizen_toolchain.gni +++ b/build/toolchain/tizen/tizen_toolchain.gni @@ -14,7 +14,7 @@ import("//build_overrides/build.gni") -import("${build_root}/config/sysroot.gni") +import("${build_root}/config/tizen/config.gni") import("${build_root}/toolchain/gcc_toolchain.gni") template("tizen_toolchain") { @@ -22,15 +22,18 @@ template("tizen_toolchain") { _tizen_toolchain_args = { current_os = "tizen" - is_clang = true + is_clang = false forward_variables_from(_invoker_toolchain_args, "*") } + _tizen_toolchain_prefix = + "${tizen_sdk_root}/tools/arm-linux-gnueabi-gcc-9.2/bin/arm-linux-gnueabi-" + gcc_toolchain(target_name) { toolchain_args = _tizen_toolchain_args - ar = "$sysroot/bin/arm-linux-gnueabi-ar" - cc = "$sysroot/bin/arm-linux-gnueabi-gcc" - cxx = "$sysroot/bin/arm-linux-gnueabi-g++" + ar = _tizen_toolchain_prefix + "ar" + cc = _tizen_toolchain_prefix + "gcc" + cxx = _tizen_toolchain_prefix + "g++" } } diff --git a/scripts/build/builders/tizen.py b/scripts/build/builders/tizen.py index 53c852bcb05a4b..b3d3a7c88a06b1 100644 --- a/scripts/build/builders/tizen.py +++ b/scripts/build/builders/tizen.py @@ -60,6 +60,17 @@ def __init__(self, root=os.path.join(root, 'examples', app.ExampleName(), 'linux'), runner=runner) + # Make sure that required ENV variables are defined + for env in ('TIZEN_SDK_ROOT', 'TIZEN_SDK_SYSROOT'): + if env not in os.environ: + raise Exception( + "Environment %s missing, cannot build Tizen target" % env) + + self.tizen_sdk_root = os.environ['TIZEN_SDK_ROOT'] + self.tizen_sdk_sysroot = os.environ['TIZEN_SDK_SYSROOT'] + self.tizen_sdk_cli = os.path.join( + self.tizen_sdk_root, "tools/ide/bin/tizen") + self.app = app self.board = board self.extra_gn_options = [] @@ -74,13 +85,11 @@ def __init__(self, raise Exception("TSAN sanitizer not supported by Tizen toolchain") def GnBuildArgs(self): - if 'TIZEN_HOME' not in os.environ: - raise Exception( - "Environment TIZEN_HOME missing, cannot build Tizen target") return self.extra_gn_options + [ 'target_os="tizen"', 'target_cpu="%s"' % self.board.TargetCpuName(), - 'sysroot="%s"' % os.environ['TIZEN_HOME'], + 'tizen_sdk_root="%s"' % self.tizen_sdk_root, + 'sysroot="%s"' % self.tizen_sdk_sysroot, ] def build_outputs(self): diff --git a/scripts/build/test.py b/scripts/build/test.py index 992a5ce800f4ae..5559847adf50d9 100644 --- a/scripts/build/test.py +++ b/scripts/build/test.py @@ -40,7 +40,8 @@ def build_actual_output(root: str, out: str, args: List[str]) -> List[str]: 'PW_PROJECT_ROOT': root, 'ANDROID_NDK_HOME': 'TEST_ANDROID_NDK_HOME', 'ANDROID_HOME': 'TEST_ANDROID_HOME', - 'TIZEN_HOME': 'TEST_TIZEN_HOME', + 'TIZEN_SDK_ROOT': 'TEST_TIZEN_SDK_ROOT', + 'TIZEN_SDK_SYSROOT': 'TEST_TIZEN_SDK_SYSROOT', 'TELINK_ZEPHYR_SDK_DIR': 'TELINK_ZEPHYR_SDK_DIR', 'SYSROOT_AARCH64': 'SYSROOT_AARCH64', 'NXP_K32W061_SDK_ROOT': 'TEST_NXP_K32W061_SDK_ROOT', diff --git a/scripts/build/testdata/build_all_except_host.txt b/scripts/build/testdata/build_all_except_host.txt index b8d5f8588bf915..1a7820ebc89b7f 100644 --- a/scripts/build/testdata/build_all_except_host.txt +++ b/scripts/build/testdata/build_all_except_host.txt @@ -950,28 +950,28 @@ source "$ZEPHYR_BASE/zephyr-env.sh"; west build --cmake-only -d {out}/telink-tlsr9518adk80d-light -b tlsr9518adk80d {root}/examples/lighting-app/telink' # Generating tizen-arm-light -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light # Generating tizen-arm-light-asan -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=is_asan=true target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-asan +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=is_asan=true target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-asan # Generating tizen-arm-light-no-ble -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-ble +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-ble # Generating tizen-arm-light-no-ble-asan -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false is_asan=true target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-ble-asan +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false is_asan=true target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-ble-asan # Generating tizen-arm-light-no-ble-no-wifi -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-ble-no-wifi +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-ble-no-wifi # Generating tizen-arm-light-no-ble-no-wifi-asan -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false is_asan=true target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-ble-no-wifi-asan +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_config_network_layer_ble=false chip_enable_wifi=false is_asan=true target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-ble-no-wifi-asan # Generating tizen-arm-light-no-wifi -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_enable_wifi=false target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-wifi +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_enable_wifi=false target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-wifi # Generating tizen-arm-light-no-wifi-asan -gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_enable_wifi=false is_asan=true target_os="tizen" target_cpu="arm" sysroot="TEST_TIZEN_HOME"' {out}/tizen-arm-light-no-wifi-asan +gn gen --check --fail-on-unused-args --export-compile-commands --root={root}/examples/lighting-app/linux '--args=chip_enable_wifi=false is_asan=true target_os="tizen" target_cpu="arm" tizen_sdk_root="TEST_TIZEN_SDK_ROOT" sysroot="TEST_TIZEN_SDK_SYSROOT"' {out}/tizen-arm-light-no-wifi-asan # Building ameba-amebad-all-clusters ninja -C {out}/ameba-amebad-all-clusters From 04c85c706aefd0a7732245e6c26250595926a7dc Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 9 May 2022 03:30:29 -0400 Subject: [PATCH 02/26] Enable pressure measurement attributes in controller config. (#18189) Fixes https://github.com/project-chip/connectedhomeip/issues/15473 --- .../data_model/controller-clusters.matter | 6 + .../data_model/controller-clusters.zap | 54 ++- .../CHIPAttributeTLVValueDecoder.cpp | 111 +++++ .../java/zap-generated/CHIPCallbackTypes.h | 12 + .../java/zap-generated/CHIPReadCallbacks.cpp | 201 ++++++++ .../java/zap-generated/CHIPReadCallbacks.h | 90 ++++ .../chip/devicecontroller/ChipClusters.java | 122 +++++ .../chip/devicecontroller/ChipIdLookup.java | 18 + .../devicecontroller/ClusterReadMapping.java | 81 ++++ .../python/chip/clusters/CHIPClusters.py | 36 ++ .../CHIPAttributeTLVValueDecoder.mm | 78 +++ .../CHIP/zap-generated/CHIPClustersObjc.h | 102 ++++ .../CHIP/zap-generated/CHIPClustersObjc.mm | 369 ++++++++++++++ .../cluster/CHIPTestClustersObjc.h | 6 + .../cluster/CHIPTestClustersObjc.mm | 123 +++++ .../zap-generated/cluster/Commands.h | 459 ++++++++++++++++++ 16 files changed, 1865 insertions(+), 3 deletions(-) diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 26b407a8e83406..d0d4ac5608f30c 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3079,6 +3079,12 @@ client cluster PressureMeasurement = 1027 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; readonly attribute nullable int16s maxMeasuredValue = 2; + readonly attribute int16u tolerance = 3; + readonly attribute nullable int16s scaledValue = 16; + readonly attribute nullable int16s minScaledValue = 17; + readonly attribute nullable int16s maxScaledValue = 18; + readonly attribute int16u scaledTolerance = 19; + readonly attribute int8s scale = 20; readonly attribute attrib_id attributeList[] = 65531; readonly attribute int16u clusterRevision = 65533; } diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 06629bdf4e102f..96a0191fe00b7d 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -14103,7 +14103,7 @@ "mfgCode": null, "side": "server", "type": "int16u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -14119,7 +14119,7 @@ "mfgCode": null, "side": "server", "type": "int16s", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -14129,13 +14129,45 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "MinScaledValue", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxScaledValue", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ScaledTolerance", "code": 19, "mfgCode": null, "side": "server", "type": "int16u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -14145,6 +14177,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "Scale", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 0baae5d9217045..3f7bf898e3eb08 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -10648,6 +10648,117 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ScaledValue::Id: { + using TypeInfo = Attributes::ScaledValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::MinScaledValue::Id: { + using TypeInfo = Attributes::MinScaledValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::MaxScaledValue::Id: { + using TypeInfo = Attributes::MaxScaledValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Value(), value); + } + return value; + } + case Attributes::ScaledTolerance::Id: { + using TypeInfo = Attributes::ScaledTolerance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::Scale::Id: { + using TypeInfo = Attributes::Scale::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 18c695e87c4b93..a3bd9e35777dd5 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -1115,6 +1115,18 @@ typedef void (*CHIPPressureMeasurementClusterMinMeasuredValueAttributeCallbackTy void *, chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo::DecodableArgType); typedef void (*CHIPPressureMeasurementClusterMaxMeasuredValueAttributeCallbackType)( void *, chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo::DecodableArgType); +typedef void (*CHIPPressureMeasurementClusterToleranceAttributeCallbackType)( + void *, chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::TypeInfo::DecodableArgType); +typedef void (*CHIPPressureMeasurementClusterScaledValueAttributeCallbackType)( + void *, chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::TypeInfo::DecodableArgType); +typedef void (*CHIPPressureMeasurementClusterMinScaledValueAttributeCallbackType)( + void *, chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::TypeInfo::DecodableArgType); +typedef void (*CHIPPressureMeasurementClusterMaxScaledValueAttributeCallbackType)( + void *, chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::TypeInfo::DecodableArgType); +typedef void (*CHIPPressureMeasurementClusterScaledToleranceAttributeCallbackType)( + void *, chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::TypeInfo::DecodableArgType); +typedef void (*CHIPPressureMeasurementClusterScaleAttributeCallbackType)( + void *, chip::app::Clusters::PressureMeasurement::Attributes::Scale::TypeInfo::DecodableArgType); typedef void (*CHIPPressureMeasurementClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::TypeInfo::DecodableType &); typedef void (*CHIPPressureMeasurementClusterClusterRevisionAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 7e9b9239309b30..1c25efa1be67cb 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -15567,6 +15567,207 @@ void CHIPPressureMeasurementMaxMeasuredValueAttributeCallback::CallbackFn(void * env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPPressureMeasurementScaledValueAttributeCallback::CHIPPressureMeasurementScaledValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPressureMeasurementScaledValueAttributeCallback::~CHIPPressureMeasurementScaledValueAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPressureMeasurementScaledValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPressureMeasurementMinScaledValueAttributeCallback::CHIPPressureMeasurementMinScaledValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPressureMeasurementMinScaledValueAttributeCallback::~CHIPPressureMeasurementMinScaledValueAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPressureMeasurementMinScaledValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPPressureMeasurementMaxScaledValueAttributeCallback::CHIPPressureMeasurementMaxScaledValueAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPPressureMeasurementMaxScaledValueAttributeCallback::~CHIPPressureMeasurementMaxScaledValueAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPPressureMeasurementMaxScaledValueAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPPressureMeasurementAttributeListAttributeCallback::CHIPPressureMeasurementAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 7085fc021c969e..160ca568cbe1f7 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -6459,6 +6459,96 @@ class CHIPPressureMeasurementMaxMeasuredValueAttributeCallback bool keepAlive; }; +class CHIPPressureMeasurementScaledValueAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPressureMeasurementScaledValueAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPressureMeasurementScaledValueAttributeCallback(); + + static void maybeDestroy(CHIPPressureMeasurementScaledValueAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPressureMeasurementMinScaledValueAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPressureMeasurementMinScaledValueAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPressureMeasurementMinScaledValueAttributeCallback(); + + static void maybeDestroy(CHIPPressureMeasurementMinScaledValueAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + +class CHIPPressureMeasurementMaxScaledValueAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPPressureMeasurementMaxScaledValueAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPPressureMeasurementMaxScaledValueAttributeCallback(); + + static void maybeDestroy(CHIPPressureMeasurementMaxScaledValueAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPPressureMeasurementAttributeListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index cebf2c0329e636..f37efa633fb75b 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -14415,6 +14415,30 @@ public interface MaxMeasuredValueAttributeCallback { default void onSubscriptionEstablished() {} } + public interface ScaledValueAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MinScaledValueAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + + public interface MaxScaledValueAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -14450,6 +14474,60 @@ public void subscribeMaxMeasuredValueAttribute( subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + public void readToleranceAttribute(IntegerAttributeCallback callback) { + readToleranceAttribute(chipClusterPtr, callback); + } + + public void subscribeToleranceAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readScaledValueAttribute(ScaledValueAttributeCallback callback) { + readScaledValueAttribute(chipClusterPtr, callback); + } + + public void subscribeScaledValueAttribute( + ScaledValueAttributeCallback callback, int minInterval, int maxInterval) { + subscribeScaledValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinScaledValueAttribute(MinScaledValueAttributeCallback callback) { + readMinScaledValueAttribute(chipClusterPtr, callback); + } + + public void subscribeMinScaledValueAttribute( + MinScaledValueAttributeCallback callback, int minInterval, int maxInterval) { + subscribeMinScaledValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxScaledValueAttribute(MaxScaledValueAttributeCallback callback) { + readMaxScaledValueAttribute(chipClusterPtr, callback); + } + + public void subscribeMaxScaledValueAttribute( + MaxScaledValueAttributeCallback callback, int minInterval, int maxInterval) { + subscribeMaxScaledValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readScaledToleranceAttribute(IntegerAttributeCallback callback) { + readScaledToleranceAttribute(chipClusterPtr, callback); + } + + public void subscribeScaledToleranceAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeScaledToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readScaleAttribute(IntegerAttributeCallback callback) { + readScaleAttribute(chipClusterPtr, callback); + } + + public void subscribeScaleAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + subscribeScaleAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + public void readAttributeListAttribute(AttributeListAttributeCallback callback) { readAttributeListAttribute(chipClusterPtr, callback); } @@ -14495,6 +14573,50 @@ private native void subscribeMaxMeasuredValueAttribute( int minInterval, int maxInterval); + private native void readToleranceAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeToleranceAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readScaledValueAttribute( + long chipClusterPtr, ScaledValueAttributeCallback callback); + + private native void subscribeScaledValueAttribute( + long chipClusterPtr, + ScaledValueAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readMinScaledValueAttribute( + long chipClusterPtr, MinScaledValueAttributeCallback callback); + + private native void subscribeMinScaledValueAttribute( + long chipClusterPtr, + MinScaledValueAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readMaxScaledValueAttribute( + long chipClusterPtr, MaxScaledValueAttributeCallback callback); + + private native void subscribeMaxScaledValueAttribute( + long chipClusterPtr, + MaxScaledValueAttributeCallback callback, + int minInterval, + int maxInterval); + + private native void readScaledToleranceAttribute( + long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeScaledToleranceAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + + private native void readScaleAttribute(long chipClusterPtr, IntegerAttributeCallback callback); + + private native void subscribeScaleAttribute( + long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index 52460aeb7d11e9..f3fdffaa90f5ae 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -1837,6 +1837,24 @@ public static String attributeIdToName(long clusterId, long attributeId) { if (attributeId == 2L) { return "MaxMeasuredValue"; } + if (attributeId == 3L) { + return "Tolerance"; + } + if (attributeId == 16L) { + return "ScaledValue"; + } + if (attributeId == 17L) { + return "MinScaledValue"; + } + if (attributeId == 18L) { + return "MaxScaledValue"; + } + if (attributeId == 19L) { + return "ScaledTolerance"; + } + if (attributeId == 20L) { + return "Scale"; + } if (attributeId == 65531L) { return "AttributeList"; } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 7e6ac932307e5b..08984c7c335d86 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -6898,6 +6898,87 @@ public Map> getReadAttributeMap() { readPressureMeasurementInteractionInfo.put( "readMaxMeasuredValueAttribute", readPressureMeasurementMaxMeasuredValueAttributeInteractionInfo); + Map readPressureMeasurementToleranceCommandParams = + new LinkedHashMap(); + InteractionInfo readPressureMeasurementToleranceAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PressureMeasurementCluster) cluster) + .readToleranceAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readPressureMeasurementToleranceCommandParams); + readPressureMeasurementInteractionInfo.put( + "readToleranceAttribute", readPressureMeasurementToleranceAttributeInteractionInfo); + Map readPressureMeasurementScaledValueCommandParams = + new LinkedHashMap(); + InteractionInfo readPressureMeasurementScaledValueAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PressureMeasurementCluster) cluster) + .readScaledValueAttribute( + (ChipClusters.PressureMeasurementCluster.ScaledValueAttributeCallback) + callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readPressureMeasurementScaledValueCommandParams); + readPressureMeasurementInteractionInfo.put( + "readScaledValueAttribute", readPressureMeasurementScaledValueAttributeInteractionInfo); + Map readPressureMeasurementMinScaledValueCommandParams = + new LinkedHashMap(); + InteractionInfo readPressureMeasurementMinScaledValueAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PressureMeasurementCluster) cluster) + .readMinScaledValueAttribute( + (ChipClusters.PressureMeasurementCluster.MinScaledValueAttributeCallback) + callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readPressureMeasurementMinScaledValueCommandParams); + readPressureMeasurementInteractionInfo.put( + "readMinScaledValueAttribute", + readPressureMeasurementMinScaledValueAttributeInteractionInfo); + Map readPressureMeasurementMaxScaledValueCommandParams = + new LinkedHashMap(); + InteractionInfo readPressureMeasurementMaxScaledValueAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PressureMeasurementCluster) cluster) + .readMaxScaledValueAttribute( + (ChipClusters.PressureMeasurementCluster.MaxScaledValueAttributeCallback) + callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readPressureMeasurementMaxScaledValueCommandParams); + readPressureMeasurementInteractionInfo.put( + "readMaxScaledValueAttribute", + readPressureMeasurementMaxScaledValueAttributeInteractionInfo); + Map readPressureMeasurementScaledToleranceCommandParams = + new LinkedHashMap(); + InteractionInfo readPressureMeasurementScaledToleranceAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PressureMeasurementCluster) cluster) + .readScaledToleranceAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readPressureMeasurementScaledToleranceCommandParams); + readPressureMeasurementInteractionInfo.put( + "readScaledToleranceAttribute", + readPressureMeasurementScaledToleranceAttributeInteractionInfo); + Map readPressureMeasurementScaleCommandParams = + new LinkedHashMap(); + InteractionInfo readPressureMeasurementScaleAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.PressureMeasurementCluster) cluster) + .readScaleAttribute((ChipClusters.IntegerAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readPressureMeasurementScaleCommandParams); + readPressureMeasurementInteractionInfo.put( + "readScaleAttribute", readPressureMeasurementScaleAttributeInteractionInfo); Map readPressureMeasurementAttributeListCommandParams = new LinkedHashMap(); InteractionInfo readPressureMeasurementAttributeListAttributeInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 1017e4c9fd3ad9..c15a0ea54f85ae 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4535,6 +4535,42 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000003: { + "attributeName": "Tolerance", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000010: { + "attributeName": "ScaledValue", + "attributeId": 0x00000010, + "type": "int", + "reportable": True, + }, + 0x00000011: { + "attributeName": "MinScaledValue", + "attributeId": 0x00000011, + "type": "int", + "reportable": True, + }, + 0x00000012: { + "attributeName": "MaxScaledValue", + "attributeId": 0x00000012, + "type": "int", + "reportable": True, + }, + 0x00000013: { + "attributeName": "ScaledTolerance", + "attributeId": 0x00000013, + "type": "int", + "reportable": True, + }, + 0x00000014: { + "attributeName": "Scale", + "attributeId": 0x00000014, + "type": "int", + "reportable": True, + }, 0x0000FFFB: { "attributeName": "AttributeList", "attributeId": 0x0000FFFB, diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 11d2ea698311f5..7bf344fe7cfeb9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -8798,6 +8798,84 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::ScaledValue::Id: { + using TypeInfo = Attributes::ScaledValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MinScaledValue::Id: { + using TypeInfo = Attributes::MinScaledValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxScaledValue::Id: { + using TypeInfo = Attributes::MaxScaledValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::ScaledTolerance::Id: { + using TypeInfo = Attributes::ScaledTolerance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::Scale::Id: { + using TypeInfo = Attributes::Scale::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 81c1a29b669f3f..e5ea3a0c4c849c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -9814,6 +9814,108 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeScaledToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeScaleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index e47b7304ea8552..f63cce817b7a00 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -37361,6 +37361,375 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMinScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeScaledToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeScaleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h index afcdd348439d88..9fc467b2e032d2 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.h @@ -926,6 +926,12 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMinMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMaxMeasuredValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeScaledValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinScaledValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxScaledValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeScaledToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeScaleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm index 4b7419edf6ffee..232c79cf5641b1 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm @@ -12173,6 +12173,129 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeScaledValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeMinScaledValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeMaxScaledValueWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeScaledToleranceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeScaleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h index 9b0741b2e8799d..d131e0857c9b2f 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h @@ -46651,6 +46651,453 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt } }; +/* + * Attribute Tolerance + */ +class ReadPressureMeasurementTolerance : public ReadAttribute { +public: + ReadPressureMeasurementTolerance() + : ReadAttribute("tolerance") + { + } + + ~ReadPressureMeasurementTolerance() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000003) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIP_ERROR __block err = CHIP_NO_ERROR; + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); + err = [CHIPError errorToCHIPErrorCode:error]; + + if (error != nil) { + ChipLogError(chipTool, "PressureMeasurement Tolerance read Error: %s", chip::ErrorStr(err)); + } + SetCommandExitStatus(err); + }]; + return err; + } +}; + +class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute { +public: + SubscribeAttributePressureMeasurementTolerance() + : SubscribeAttribute("tolerance") + { + } + + ~SubscribeAttributePressureMeasurementTolerance() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIPSubscribeParams * params = [[CHIPSubscribeParams 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 + subscriptionEstablished:nullptr + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } + }]; + + return CHIP_NO_ERROR; + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } +}; + +/* + * Attribute ScaledValue + */ +class ReadPressureMeasurementScaledValue : public ReadAttribute { +public: + ReadPressureMeasurementScaledValue() + : ReadAttribute("scaled-value") + { + } + + ~ReadPressureMeasurementScaledValue() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000010) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIP_ERROR __block err = CHIP_NO_ERROR; + [cluster readAttributeScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); + err = [CHIPError errorToCHIPErrorCode:error]; + + if (error != nil) { + ChipLogError(chipTool, "PressureMeasurement ScaledValue read Error: %s", chip::ErrorStr(err)); + } + SetCommandExitStatus(err); + }]; + return err; + } +}; + +class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribute { +public: + SubscribeAttributePressureMeasurementScaledValue() + : SubscribeAttribute("scaled-value") + { + } + + ~SubscribeAttributePressureMeasurementScaledValue() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000010) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIPSubscribeParams * params = [[CHIPSubscribeParams 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 + subscriptionEstablished:nullptr + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } + }]; + + return CHIP_NO_ERROR; + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } +}; + +/* + * Attribute MinScaledValue + */ +class ReadPressureMeasurementMinScaledValue : public ReadAttribute { +public: + ReadPressureMeasurementMinScaledValue() + : ReadAttribute("min-scaled-value") + { + } + + ~ReadPressureMeasurementMinScaledValue() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000011) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIP_ERROR __block err = CHIP_NO_ERROR; + [cluster readAttributeMinScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); + err = [CHIPError errorToCHIPErrorCode:error]; + + if (error != nil) { + ChipLogError(chipTool, "PressureMeasurement MinScaledValue read Error: %s", chip::ErrorStr(err)); + } + SetCommandExitStatus(err); + }]; + return err; + } +}; + +class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttribute { +public: + SubscribeAttributePressureMeasurementMinScaledValue() + : SubscribeAttribute("min-scaled-value") + { + } + + ~SubscribeAttributePressureMeasurementMinScaledValue() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000011) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIPSubscribeParams * params = [[CHIPSubscribeParams 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 + subscriptionEstablished:nullptr + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } + }]; + + return CHIP_NO_ERROR; + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } +}; + +/* + * Attribute MaxScaledValue + */ +class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { +public: + ReadPressureMeasurementMaxScaledValue() + : ReadAttribute("max-scaled-value") + { + } + + ~ReadPressureMeasurementMaxScaledValue() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000012) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIP_ERROR __block err = CHIP_NO_ERROR; + [cluster readAttributeMaxScaledValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); + err = [CHIPError errorToCHIPErrorCode:error]; + + if (error != nil) { + ChipLogError(chipTool, "PressureMeasurement MaxScaledValue read Error: %s", chip::ErrorStr(err)); + } + SetCommandExitStatus(err); + }]; + return err; + } +}; + +class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttribute { +public: + SubscribeAttributePressureMeasurementMaxScaledValue() + : SubscribeAttribute("max-scaled-value") + { + } + + ~SubscribeAttributePressureMeasurementMaxScaledValue() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000012) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIPSubscribeParams * params = [[CHIPSubscribeParams 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 + subscriptionEstablished:nullptr + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } + }]; + + return CHIP_NO_ERROR; + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } +}; + +/* + * Attribute ScaledTolerance + */ +class ReadPressureMeasurementScaledTolerance : public ReadAttribute { +public: + ReadPressureMeasurementScaledTolerance() + : ReadAttribute("scaled-tolerance") + { + } + + ~ReadPressureMeasurementScaledTolerance() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000013) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIP_ERROR __block err = CHIP_NO_ERROR; + [cluster readAttributeScaledToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); + err = [CHIPError errorToCHIPErrorCode:error]; + + if (error != nil) { + ChipLogError(chipTool, "PressureMeasurement ScaledTolerance read Error: %s", chip::ErrorStr(err)); + } + SetCommandExitStatus(err); + }]; + return err; + } +}; + +class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAttribute { +public: + SubscribeAttributePressureMeasurementScaledTolerance() + : SubscribeAttribute("scaled-tolerance") + { + } + + ~SubscribeAttributePressureMeasurementScaledTolerance() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000013) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIPSubscribeParams * params = [[CHIPSubscribeParams 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 + subscriptionEstablished:nullptr + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } + }]; + + return CHIP_NO_ERROR; + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } +}; + +/* + * Attribute Scale + */ +class ReadPressureMeasurementScale : public ReadAttribute { +public: + ReadPressureMeasurementScale() + : ReadAttribute("scale") + { + } + + ~ReadPressureMeasurementScale() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000014) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIP_ERROR __block err = CHIP_NO_ERROR; + [cluster readAttributeScaleWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Scale response %@", [value description]); + err = [CHIPError errorToCHIPErrorCode:error]; + + if (error != nil) { + ChipLogError(chipTool, "PressureMeasurement Scale read Error: %s", chip::ErrorStr(err)); + } + SetCommandExitStatus(err); + }]; + return err; + } +}; + +class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { +public: + SubscribeAttributePressureMeasurementScale() + : SubscribeAttribute("scale") + { + } + + ~SubscribeAttributePressureMeasurementScale() {} + + CHIP_ERROR SendCommand(CHIPDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000014) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + CHIPPressureMeasurement * cluster = [[CHIPPressureMeasurement alloc] initWithDevice:device + endpoint:endpointId + queue:callbackQueue]; + CHIPSubscribeParams * params = [[CHIPSubscribeParams 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 + subscriptionEstablished:nullptr + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Scale response %@", [value description]); + if (error || !mWait) { + SetCommandExitStatus([CHIPError errorToCHIPErrorCode:error]); + } + }]; + + return CHIP_NO_ERROR; + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); + } +}; + /* * Attribute AttributeList */ @@ -78821,6 +79268,18 @@ void registerClusterPressureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // From 44dd01b9fa49b2a31a7d8ba52084cef7d9e73e17 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Mon, 9 May 2022 20:43:48 +0800 Subject: [PATCH 03/26] Add proper certs for unit-tests (#18162) --- src/credentials/tests/BUILD.gn | 2 + .../tests/CHIPCert_unit_test_vectors.cpp | 351 ++++++++++++++++++ .../tests/CHIPCert_unit_test_vectors.h | 56 +++ .../tests/certificates/UnitTest_IA_A1.crt | 12 + .../tests/certificates/UnitTest_IA_A1.crt.txt | 36 ++ .../tests/certificates/UnitTest_IA_A1.pem | 5 + .../tests/certificates/UnitTest_IA_A1.pem.txt | 13 + .../tests/certificates/UnitTest_IA_A2.crt | 12 + .../tests/certificates/UnitTest_IA_A2.crt.txt | 36 ++ .../tests/certificates/UnitTest_IA_A2.pem | 5 + .../tests/certificates/UnitTest_IA_A2.pem.txt | 13 + .../tests/certificates/UnitTest_IA_B1.crt | 11 + .../tests/certificates/UnitTest_IA_B1.crt.txt | 36 ++ .../tests/certificates/UnitTest_IA_B1.pem | 5 + .../tests/certificates/UnitTest_IA_B1.pem.txt | 13 + .../tests/certificates/UnitTest_NodeA1.crt | 13 + .../certificates/UnitTest_NodeA1.crt.txt | 38 ++ .../tests/certificates/UnitTest_NodeA1.pem | 5 + .../certificates/UnitTest_NodeA1.pem.txt | 13 + .../tests/certificates/UnitTest_NodeA2.crt | 13 + .../certificates/UnitTest_NodeA2.crt.txt | 38 ++ .../tests/certificates/UnitTest_NodeA2.pem | 5 + .../certificates/UnitTest_NodeA2.pem.txt | 13 + .../tests/certificates/UnitTest_NodeA3.crt | 13 + .../certificates/UnitTest_NodeA3.crt.txt | 38 ++ .../tests/certificates/UnitTest_NodeA3.pem | 5 + .../certificates/UnitTest_NodeA3.pem.txt | 13 + .../tests/certificates/UnitTest_NodeA4.crt | 13 + .../certificates/UnitTest_NodeA4.crt.txt | 38 ++ .../tests/certificates/UnitTest_NodeA4.pem | 5 + .../certificates/UnitTest_NodeA4.pem.txt | 13 + .../tests/certificates/UnitTest_NodeB1.crt | 13 + .../certificates/UnitTest_NodeB1.crt.txt | 38 ++ .../tests/certificates/UnitTest_NodeB1.pem | 5 + .../certificates/UnitTest_NodeB1.pem.txt | 13 + .../tests/certificates/UnitTest_RootA.crt | 13 + .../tests/certificates/UnitTest_RootA.crt.txt | 36 ++ .../tests/certificates/UnitTest_RootA.pem | 5 + .../tests/certificates/UnitTest_RootA.pem.txt | 13 + .../tests/certificates/UnitTest_RootB.crt | 11 + .../tests/certificates/UnitTest_RootB.crt.txt | 36 ++ .../tests/certificates/UnitTest_RootB.pem | 5 + .../tests/certificates/UnitTest_RootB.pem.txt | 13 + src/credentials/tests/certificates/certs | 10 + src/credentials/tests/certificates/keys | 10 + 45 files changed, 1103 insertions(+) create mode 100644 src/credentials/tests/CHIPCert_unit_test_vectors.cpp create mode 100644 src/credentials/tests/CHIPCert_unit_test_vectors.h create mode 100644 src/credentials/tests/certificates/UnitTest_IA_A1.crt create mode 100644 src/credentials/tests/certificates/UnitTest_IA_A1.crt.txt create mode 100644 src/credentials/tests/certificates/UnitTest_IA_A1.pem create mode 100644 src/credentials/tests/certificates/UnitTest_IA_A1.pem.txt create mode 100644 src/credentials/tests/certificates/UnitTest_IA_A2.crt create mode 100644 src/credentials/tests/certificates/UnitTest_IA_A2.crt.txt create mode 100644 src/credentials/tests/certificates/UnitTest_IA_A2.pem create mode 100644 src/credentials/tests/certificates/UnitTest_IA_A2.pem.txt create mode 100644 src/credentials/tests/certificates/UnitTest_IA_B1.crt create mode 100644 src/credentials/tests/certificates/UnitTest_IA_B1.crt.txt create mode 100644 src/credentials/tests/certificates/UnitTest_IA_B1.pem create mode 100644 src/credentials/tests/certificates/UnitTest_IA_B1.pem.txt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA1.crt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA1.crt.txt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA1.pem create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA1.pem.txt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA2.crt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA2.crt.txt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA2.pem create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA2.pem.txt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA3.crt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA3.crt.txt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA3.pem create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA3.pem.txt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA4.crt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA4.crt.txt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA4.pem create mode 100644 src/credentials/tests/certificates/UnitTest_NodeA4.pem.txt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeB1.crt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeB1.crt.txt create mode 100644 src/credentials/tests/certificates/UnitTest_NodeB1.pem create mode 100644 src/credentials/tests/certificates/UnitTest_NodeB1.pem.txt create mode 100644 src/credentials/tests/certificates/UnitTest_RootA.crt create mode 100644 src/credentials/tests/certificates/UnitTest_RootA.crt.txt create mode 100644 src/credentials/tests/certificates/UnitTest_RootA.pem create mode 100644 src/credentials/tests/certificates/UnitTest_RootA.pem.txt create mode 100644 src/credentials/tests/certificates/UnitTest_RootB.crt create mode 100644 src/credentials/tests/certificates/UnitTest_RootB.crt.txt create mode 100644 src/credentials/tests/certificates/UnitTest_RootB.pem create mode 100644 src/credentials/tests/certificates/UnitTest_RootB.pem.txt create mode 100644 src/credentials/tests/certificates/certs create mode 100644 src/credentials/tests/certificates/keys diff --git a/src/credentials/tests/BUILD.gn b/src/credentials/tests/BUILD.gn index b47f0c16f697cd..5a31b6003b1c3e 100644 --- a/src/credentials/tests/BUILD.gn +++ b/src/credentials/tests/BUILD.gn @@ -27,6 +27,8 @@ static_library("cert_test_vectors") { "CHIPAttCert_test_vectors.h", "CHIPCert_test_vectors.cpp", "CHIPCert_test_vectors.h", + "CHIPCert_unit_test_vectors.cpp", + "CHIPCert_unit_test_vectors.h", ] cflags = [ "-Wconversion" ] diff --git a/src/credentials/tests/CHIPCert_unit_test_vectors.cpp b/src/credentials/tests/CHIPCert_unit_test_vectors.cpp new file mode 100644 index 00000000000000..034079ec935ae1 --- /dev/null +++ b/src/credentials/tests/CHIPCert_unit_test_vectors.cpp @@ -0,0 +1,351 @@ +/* + * 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 "CHIPCert_unit_test_vectors.h" + +namespace chip { +namespace TestCerts { + +// Following parts are generated by command: +// +// cat src/credentials/tests/certificates/certs | while read i; do +// ./out/linux-x64-chip-cert/chip-cert convert-cert -c src/credentials/tests/certificates/$i /tmp/certs/$i +// xxd -i /tmp/certs/$i +// echo +// done >> src/credentials/tests/CHIPCert_unit_test_vectors.cpp +// +// With minor edit + +// ======== Begin Generated Certs ======== +unsigned char UnitTest_RootA_crt[] = { + 0x15, 0x30, 0x01, 0x08, 0x64, 0xb5, 0x3e, 0x16, 0xd1, 0x6c, 0x62, 0x10, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x14, 0x0a, 0x00, + 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbf, 0xfa, 0x18, 0x26, 0x04, 0x8c, 0xba, + 0x07, 0x2a, 0x26, 0x05, 0x0c, 0x58, 0xa6, 0x4f, 0x37, 0x06, 0x27, 0x14, 0x0a, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, + 0x15, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbf, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x5b, + 0xdd, 0x96, 0x58, 0x03, 0x5f, 0x6c, 0x26, 0x69, 0xe9, 0x27, 0xf0, 0xc1, 0xab, 0xa0, 0x79, 0xd3, 0x23, 0x44, 0x83, 0xc1, 0x82, + 0x39, 0x78, 0x4b, 0x1a, 0x0d, 0x05, 0x7f, 0x62, 0xce, 0x72, 0x8c, 0xae, 0x3b, 0x9f, 0xef, 0x49, 0x18, 0xf0, 0xe8, 0xe8, 0x3b, + 0x6e, 0x98, 0x71, 0x81, 0x79, 0xb7, 0x8f, 0x66, 0x3a, 0x49, 0x0f, 0x7c, 0x32, 0x0e, 0x5d, 0x8b, 0x7c, 0x76, 0x55, 0x6a, 0x2e, + 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x30, 0x04, 0x14, 0x05, 0xf4, 0x81, 0x3b, 0x07, 0xfc, 0xb2, 0x6e, 0x56, 0xc8, 0x56, + 0x3c, 0x3b, 0x11, 0x97, 0x1f, 0xf6, 0xd1, 0xad, 0x1f, 0x30, 0x05, 0x14, 0x05, 0xf4, 0x81, 0x3b, 0x07, 0xfc, 0xb2, 0x6e, 0x56, + 0xc8, 0x56, 0x3c, 0x3b, 0x11, 0x97, 0x1f, 0xf6, 0xd1, 0xad, 0x1f, 0x24, 0x02, 0x60, 0x18, 0x30, 0x0b, 0x40, 0xe4, 0x18, 0xf4, + 0xf7, 0x54, 0x5b, 0x9d, 0xa1, 0xe3, 0xdd, 0x9f, 0xb4, 0x70, 0x1a, 0x47, 0xda, 0xca, 0x41, 0x80, 0x56, 0xfc, 0x6a, 0xe1, 0x71, + 0x02, 0xa1, 0xfc, 0xc6, 0xd2, 0x82, 0x02, 0x57, 0x6d, 0xfd, 0x4b, 0xa7, 0xeb, 0x1c, 0x1d, 0x38, 0x8a, 0xfb, 0x6e, 0x4d, 0xed, + 0x33, 0x1f, 0xf3, 0x91, 0xf7, 0xfb, 0x2b, 0xb6, 0x59, 0x85, 0x6b, 0x4b, 0x42, 0x1b, 0x35, 0x9b, 0x15, 0xe8, 0xc0, 0x18 +}; +unsigned int UnitTest_RootA_crt_len = 272; + +unsigned char UnitTest_RootB_crt[] = { + 0x15, 0x30, 0x01, 0x08, 0x1d, 0xe8, 0xdc, 0x31, 0x7d, 0x93, 0x8e, 0x8e, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x14, 0x0b, 0x00, + 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x20, 0xae, 0x07, 0x2a, 0x26, 0x05, 0xa0, 0x4b, 0xa6, 0x4f, 0x37, 0x06, + 0x27, 0x14, 0x0b, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, + 0x66, 0x90, 0x7a, 0xd6, 0x68, 0xee, 0x8a, 0xc8, 0xbf, 0x9e, 0x98, 0xba, 0xdb, 0x15, 0x47, 0x18, 0x4e, 0x82, 0x6e, 0x5a, 0x22, + 0x41, 0x96, 0x27, 0xe8, 0x5f, 0xc7, 0x47, 0xaf, 0x74, 0xe4, 0x47, 0x44, 0x46, 0x9a, 0x63, 0xed, 0x21, 0x5f, 0x66, 0x85, 0x2d, + 0x0d, 0xfc, 0x23, 0x07, 0x83, 0x74, 0x8c, 0x9e, 0x98, 0x80, 0xe5, 0xcc, 0xd9, 0x79, 0xd0, 0x67, 0x27, 0xeb, 0x45, 0xb3, 0x81, + 0x55, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x30, 0x04, 0x14, 0xb9, 0xad, 0x57, 0x9d, 0xbc, 0xd9, 0x5a, 0x3f, 0x34, 0x07, + 0x17, 0x8f, 0x04, 0x02, 0x5b, 0x40, 0x29, 0x12, 0xbd, 0xa9, 0x30, 0x05, 0x14, 0xb9, 0xad, 0x57, 0x9d, 0xbc, 0xd9, 0x5a, 0x3f, + 0x34, 0x07, 0x17, 0x8f, 0x04, 0x02, 0x5b, 0x40, 0x29, 0x12, 0xbd, 0xa9, 0x24, 0x02, 0x60, 0x18, 0x30, 0x0b, 0x40, 0xbc, 0xf0, + 0x78, 0x1a, 0xba, 0xd6, 0x85, 0xbc, 0x8e, 0xbc, 0xb3, 0x67, 0x43, 0xcb, 0x9c, 0x45, 0x87, 0xba, 0x89, 0xe9, 0xa1, 0xdb, 0xc1, + 0x79, 0x6f, 0x9d, 0xf5, 0xd6, 0x72, 0xf9, 0x7b, 0x45, 0xa4, 0xa5, 0xa4, 0x96, 0x3a, 0x53, 0x31, 0x73, 0x0f, 0xe3, 0x25, 0x2b, + 0xe4, 0x8a, 0x4c, 0x68, 0x9b, 0xbc, 0x6d, 0xbd, 0x2e, 0x10, 0xda, 0x38, 0x38, 0x08, 0xe3, 0x48, 0x16, 0x47, 0xb4, 0x7c, 0x18 +}; +unsigned int UnitTest_RootB_crt_len = 252; + +unsigned char UnitTest_IA_A1_crt[] = { + 0x15, 0x30, 0x01, 0x08, 0x2e, 0x9f, 0x88, 0x59, 0xb5, 0x0c, 0x2a, 0x26, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x14, 0x0a, 0x00, + 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbf, 0xfa, 0x18, 0x26, 0x04, 0x68, 0xb1, + 0x07, 0x2a, 0x26, 0x05, 0xe8, 0x4e, 0xa6, 0x4f, 0x37, 0x06, 0x27, 0x13, 0xa1, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, + 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x0b, 0x93, 0x13, 0x6f, 0xca, 0x1b, 0xc7, 0x38, 0x64, 0x5e, 0xc0, + 0x80, 0x9e, 0xaa, 0x07, 0xa7, 0x89, 0x99, 0x6b, 0x55, 0xfc, 0x65, 0xaa, 0xb1, 0x0c, 0x9f, 0xf9, 0xa7, 0x6f, 0x07, 0x15, 0x78, + 0xcf, 0x2f, 0xbd, 0xf4, 0xdc, 0x06, 0x82, 0xbb, 0x17, 0xdb, 0xc9, 0x1e, 0x36, 0xa7, 0x2e, 0xa4, 0xc7, 0x44, 0xfe, 0xef, 0xf5, + 0x34, 0xc3, 0x44, 0x76, 0xda, 0xb4, 0xdb, 0xa2, 0xba, 0x03, 0xef, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x30, 0x04, 0x14, + 0xd4, 0x64, 0x18, 0xab, 0x4c, 0xe3, 0x7e, 0x69, 0xcb, 0xe1, 0x13, 0xa1, 0xe9, 0xa8, 0x4a, 0x63, 0x73, 0x94, 0x72, 0x10, 0x30, + 0x05, 0x14, 0x05, 0xf4, 0x81, 0x3b, 0x07, 0xfc, 0xb2, 0x6e, 0x56, 0xc8, 0x56, 0x3c, 0x3b, 0x11, 0x97, 0x1f, 0xf6, 0xd1, 0xad, + 0x1f, 0x24, 0x02, 0x60, 0x18, 0x30, 0x0b, 0x40, 0x6e, 0x10, 0xc5, 0x57, 0x88, 0x1c, 0x96, 0xb6, 0xa8, 0x12, 0xf3, 0x34, 0xe1, + 0x59, 0x26, 0x6e, 0xb5, 0x60, 0x2e, 0x50, 0x3b, 0x49, 0x59, 0xe7, 0x1d, 0xf3, 0x38, 0x42, 0x9c, 0x25, 0xed, 0x32, 0x45, 0xda, + 0x5a, 0x32, 0x1d, 0x72, 0x47, 0x19, 0xa9, 0xa0, 0xed, 0x91, 0x0a, 0xd1, 0x08, 0xad, 0xfd, 0xb4, 0xe6, 0x1d, 0xd0, 0x44, 0x06, + 0xe2, 0xbe, 0xd1, 0xab, 0x69, 0x30, 0x41, 0x71, 0x02, 0x18 +}; +unsigned int UnitTest_IA_A1_crt_len = 262; + +unsigned char UnitTest_IA_A2_crt[] = { + 0x15, 0x30, 0x01, 0x08, 0x11, 0x7c, 0x9c, 0xdc, 0x72, 0x1b, 0x64, 0xa9, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x14, 0x0a, 0x00, + 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbf, 0xfa, 0x18, 0x26, 0x04, 0xa4, 0xb1, + 0x07, 0x2a, 0x26, 0x05, 0x24, 0x4f, 0xa6, 0x4f, 0x37, 0x06, 0x27, 0x13, 0xa2, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, + 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x56, 0x42, 0x98, 0x5c, 0x75, 0x68, 0x8c, 0x7e, 0xc3, 0x39, 0x8b, + 0xf4, 0x1f, 0xce, 0xa4, 0xb9, 0x8a, 0x3e, 0xd0, 0xa5, 0x8d, 0x14, 0x95, 0xb8, 0xf5, 0x39, 0x57, 0x6d, 0x8c, 0xae, 0x3b, 0x7f, + 0xa3, 0xb5, 0x27, 0xa7, 0xb4, 0x67, 0xa3, 0xd9, 0xbf, 0x32, 0xd0, 0xae, 0xd4, 0x91, 0x6b, 0x35, 0xc4, 0x40, 0x9e, 0x48, 0x55, + 0x5c, 0xa1, 0x82, 0x2c, 0xec, 0x79, 0xfe, 0x65, 0xf9, 0x89, 0xdc, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x30, 0x04, 0x14, + 0x0f, 0x84, 0x4c, 0xf6, 0x84, 0x73, 0x3d, 0xec, 0x6c, 0x8b, 0xeb, 0x28, 0x95, 0x4b, 0xbe, 0x1b, 0x89, 0xd3, 0xa7, 0x6c, 0x30, + 0x05, 0x14, 0x05, 0xf4, 0x81, 0x3b, 0x07, 0xfc, 0xb2, 0x6e, 0x56, 0xc8, 0x56, 0x3c, 0x3b, 0x11, 0x97, 0x1f, 0xf6, 0xd1, 0xad, + 0x1f, 0x24, 0x02, 0x60, 0x18, 0x30, 0x0b, 0x40, 0xfa, 0xb8, 0xdf, 0x2c, 0xca, 0x48, 0x9b, 0x7f, 0x7f, 0xcf, 0xef, 0xc1, 0x1b, + 0xa5, 0xb7, 0x25, 0x48, 0x3f, 0xa0, 0xef, 0x6d, 0x62, 0xfe, 0x03, 0xd6, 0xcd, 0x83, 0x8e, 0x86, 0x55, 0x73, 0x63, 0x65, 0x78, + 0x12, 0xe8, 0x0e, 0x37, 0xb9, 0x8b, 0x37, 0x22, 0x1d, 0x97, 0xd3, 0xbf, 0xa0, 0x46, 0x71, 0x4c, 0x82, 0xcd, 0xca, 0x49, 0x8a, + 0xc3, 0x37, 0xf6, 0xa3, 0x00, 0x40, 0x01, 0x6d, 0x26, 0x18 +}; +unsigned int UnitTest_IA_A2_crt_len = 262; + +unsigned char UnitTest_IA_B1_crt[] = { + 0x15, 0x30, 0x01, 0x08, 0x1b, 0xb1, 0x3c, 0x7a, 0x3a, 0xca, 0x74, 0xe2, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x14, 0x0b, 0x00, + 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x68, 0xb1, 0x07, 0x2a, 0x26, 0x05, 0xa0, 0x4b, 0xa6, 0x4f, 0x37, 0x06, + 0x27, 0x13, 0xb1, 0x00, 0x00, 0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, + 0x1e, 0x41, 0xba, 0xee, 0xbb, 0x08, 0x16, 0x58, 0xd4, 0x91, 0x78, 0x7c, 0x1b, 0x1b, 0xea, 0x24, 0xb4, 0xc4, 0x14, 0x2f, 0x47, + 0x86, 0xc3, 0x76, 0x13, 0xfb, 0xdb, 0xdc, 0x1c, 0x65, 0xa9, 0xd0, 0xd2, 0x39, 0x7b, 0x2c, 0xa0, 0xa8, 0xfe, 0x2e, 0xee, 0xcd, + 0x35, 0xc0, 0xd6, 0x26, 0x9c, 0xc8, 0x34, 0x95, 0x44, 0xc8, 0xee, 0xf3, 0xe6, 0x61, 0x39, 0xda, 0xc4, 0x84, 0x21, 0xbe, 0x1e, + 0x89, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x30, 0x04, 0x14, 0x09, 0x43, 0x17, 0x10, 0x96, 0x73, 0x6a, 0x0b, 0xc8, 0xce, + 0x27, 0x34, 0x2e, 0x43, 0x24, 0xb1, 0xca, 0x98, 0xcf, 0x5a, 0x30, 0x05, 0x14, 0xb9, 0xad, 0x57, 0x9d, 0xbc, 0xd9, 0x5a, 0x3f, + 0x34, 0x07, 0x17, 0x8f, 0x04, 0x02, 0x5b, 0x40, 0x29, 0x12, 0xbd, 0xa9, 0x24, 0x02, 0x60, 0x18, 0x30, 0x0b, 0x40, 0xb6, 0x19, + 0xc8, 0x80, 0x99, 0xbf, 0x5e, 0x17, 0xd4, 0x3d, 0xec, 0x22, 0x01, 0x2c, 0x00, 0xb9, 0x37, 0xac, 0x7e, 0x6b, 0xed, 0x0c, 0x1a, + 0x7b, 0x75, 0x09, 0x0d, 0xa7, 0xb2, 0xde, 0xb1, 0x58, 0x1c, 0xb9, 0x04, 0x61, 0x56, 0xa4, 0x4f, 0xff, 0x31, 0xdb, 0xe4, 0x2a, + 0x22, 0x91, 0xf9, 0x8c, 0x70, 0xcd, 0x59, 0xb9, 0xdc, 0x44, 0x9e, 0xa2, 0xbd, 0x80, 0x72, 0x37, 0x7b, 0x0a, 0x7d, 0x2b, 0x18 +}; +unsigned int UnitTest_IA_B1_crt_len = 252; + +unsigned char UnitTest_NodeA1_crt[] = { + 0x15, 0x30, 0x01, 0x08, 0x09, 0xba, 0xa5, 0xb6, 0x8b, 0x84, 0x71, 0xd8, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0xa1, 0x00, + 0x00, 0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, 0x26, 0x04, 0x58, 0xb2, 0x07, 0x2a, 0x26, 0x05, 0xd8, 0x4f, 0xa6, 0x4f, 0x37, 0x06, + 0x26, 0x11, 0x44, 0x33, 0x22, 0x11, 0x27, 0x15, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbf, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, + 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x38, 0x9b, 0x9e, 0xc4, 0x9e, 0x84, 0x48, 0xc0, 0x8f, 0x34, 0x14, 0x9c, 0x3e, 0xa9, 0x47, + 0xd1, 0x49, 0xe2, 0xbb, 0xf5, 0x93, 0x93, 0x47, 0x5f, 0xa9, 0x16, 0x71, 0x3a, 0xc7, 0x81, 0xd2, 0x73, 0xf8, 0xb5, 0x29, 0xb2, + 0x8f, 0xbe, 0xba, 0x1e, 0x3a, 0x27, 0xd1, 0x42, 0x67, 0xd4, 0x0c, 0x5e, 0xa7, 0x25, 0x4b, 0x62, 0x57, 0x7d, 0x00, 0x30, 0x30, + 0x27, 0xd8, 0xa8, 0x4f, 0xa1, 0x11, 0xa0, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x30, 0x04, 0x14, 0x69, 0x8d, 0xfb, 0xed, + 0x4a, 0xac, 0x4d, 0xe7, 0x38, 0x95, 0xc6, 0x4f, 0xbe, 0x5e, 0x6f, 0xee, 0xce, 0x9b, 0xf9, 0x59, 0x30, 0x05, 0x14, 0xd4, 0x64, + 0x18, 0xab, 0x4c, 0xe3, 0x7e, 0x69, 0xcb, 0xe1, 0x13, 0xa1, 0xe9, 0xa8, 0x4a, 0x63, 0x73, 0x94, 0x72, 0x10, 0x24, 0x02, 0x01, + 0x36, 0x03, 0x04, 0x01, 0x04, 0x02, 0x18, 0x18, 0x30, 0x0b, 0x40, 0xba, 0x9e, 0xc3, 0x01, 0x7a, 0x12, 0x1a, 0x8b, 0x72, 0xfd, + 0x9a, 0xc7, 0x4f, 0x00, 0x68, 0x98, 0xa1, 0x28, 0x5d, 0x56, 0xfc, 0x8a, 0xd9, 0x4f, 0x56, 0x55, 0x6f, 0x6b, 0x2b, 0x94, 0x1f, + 0x1c, 0x1a, 0xdd, 0x66, 0x44, 0x2d, 0xe5, 0xc6, 0x8e, 0xae, 0x52, 0xc0, 0xa4, 0x53, 0xbd, 0x50, 0xa4, 0x5f, 0xb5, 0x6a, 0x96, + 0x7a, 0x6b, 0xc2, 0x74, 0x3c, 0x54, 0x81, 0xe2, 0x1c, 0x4a, 0x04, 0x14, 0x18 +}; +unsigned int UnitTest_NodeA1_crt_len = 265; + +unsigned char UnitTest_NodeA2_crt[] = { + 0x15, 0x30, 0x01, 0x08, 0x21, 0xac, 0x81, 0x9d, 0x91, 0x60, 0xf6, 0xf0, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0xa1, 0x00, + 0x00, 0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, 0x26, 0x04, 0x58, 0xb2, 0x07, 0x2a, 0x26, 0x05, 0xd8, 0x4f, 0xa6, 0x4f, 0x37, 0x06, + 0x26, 0x11, 0x21, 0x43, 0x34, 0x12, 0x27, 0x15, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbf, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, + 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x5c, 0x1b, 0x09, 0xfc, 0x88, 0xf6, 0x2b, 0x91, 0xfa, 0xcb, 0x86, 0xef, 0x7d, 0x79, 0x21, + 0x09, 0x47, 0x06, 0xc9, 0xd9, 0x09, 0x8a, 0x2b, 0xa9, 0x39, 0x2b, 0xfc, 0x2f, 0x57, 0x95, 0x96, 0xf2, 0xda, 0x1b, 0x79, 0x62, + 0x52, 0xa9, 0xc6, 0xe4, 0x29, 0xc6, 0x42, 0xe7, 0x21, 0xb4, 0x99, 0x24, 0x0f, 0x35, 0x04, 0xac, 0xcb, 0x84, 0x97, 0x3a, 0xb7, + 0xba, 0x80, 0xc9, 0xb8, 0x3f, 0x19, 0xc0, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x30, 0x04, 0x14, 0xfb, 0x0e, 0x82, 0x8a, + 0x91, 0x6d, 0x1a, 0x0f, 0x6a, 0xe9, 0x72, 0x1f, 0xd6, 0x11, 0xc3, 0xca, 0xbd, 0x6f, 0xe6, 0xba, 0x30, 0x05, 0x14, 0xd4, 0x64, + 0x18, 0xab, 0x4c, 0xe3, 0x7e, 0x69, 0xcb, 0xe1, 0x13, 0xa1, 0xe9, 0xa8, 0x4a, 0x63, 0x73, 0x94, 0x72, 0x10, 0x24, 0x02, 0x01, + 0x36, 0x03, 0x04, 0x01, 0x04, 0x02, 0x18, 0x18, 0x30, 0x0b, 0x40, 0xfd, 0x6c, 0xd6, 0x56, 0x6b, 0x69, 0x7f, 0x3b, 0x3b, 0x5e, + 0xf0, 0x36, 0x35, 0x78, 0x2e, 0x2d, 0x09, 0xcd, 0xa1, 0xf5, 0xa5, 0x96, 0x6a, 0xf3, 0xdc, 0x4d, 0x4d, 0xdb, 0x5e, 0x2a, 0x6a, + 0xd4, 0xbe, 0x1c, 0x89, 0xde, 0x26, 0xe9, 0xd8, 0x01, 0x8c, 0x65, 0x6c, 0xcc, 0x67, 0xec, 0xab, 0xb1, 0xa5, 0xc0, 0x0d, 0x95, + 0x4e, 0x0a, 0x12, 0xfd, 0x00, 0xad, 0x4e, 0xbb, 0xa5, 0x99, 0xe7, 0x37, 0x18 +}; +unsigned int UnitTest_NodeA2_crt_len = 265; + +unsigned char UnitTest_NodeA3_crt[] = { + 0x15, 0x30, 0x01, 0x08, 0x6a, 0x6e, 0x7c, 0x02, 0x27, 0xe7, 0x85, 0x44, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0xa2, 0x00, + 0x00, 0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, 0x26, 0x04, 0x58, 0xb2, 0x07, 0x2a, 0x26, 0x05, 0x24, 0x4f, 0xa6, 0x4f, 0x37, 0x06, + 0x26, 0x11, 0x44, 0x44, 0x33, 0x33, 0x27, 0x15, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbf, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, + 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xdc, 0x86, 0xdf, 0x41, 0xfd, 0x7f, 0x64, 0x7b, 0x06, 0xf4, 0xc1, 0xaf, 0x96, 0x97, 0xe8, + 0x51, 0x85, 0x5b, 0x33, 0x6a, 0xeb, 0x04, 0x2b, 0x38, 0xf0, 0x2b, 0xec, 0x46, 0x19, 0x1a, 0x92, 0x7a, 0xe8, 0x56, 0xec, 0xb3, + 0x1e, 0x94, 0x81, 0x2e, 0x88, 0xf0, 0xc3, 0xff, 0x25, 0xa0, 0x05, 0xfd, 0xcf, 0x65, 0xf7, 0xc2, 0x45, 0xbd, 0x5d, 0xdc, 0xc0, + 0xa7, 0x6d, 0x32, 0xac, 0xc0, 0xf0, 0xe2, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x30, 0x04, 0x14, 0xff, 0x09, 0xbf, 0x22, + 0xa9, 0x30, 0xc3, 0x52, 0xee, 0x28, 0x43, 0xa6, 0x9b, 0xe3, 0xe1, 0x8a, 0x8f, 0x08, 0x6e, 0x05, 0x30, 0x05, 0x14, 0x0f, 0x84, + 0x4c, 0xf6, 0x84, 0x73, 0x3d, 0xec, 0x6c, 0x8b, 0xeb, 0x28, 0x95, 0x4b, 0xbe, 0x1b, 0x89, 0xd3, 0xa7, 0x6c, 0x24, 0x02, 0x01, + 0x36, 0x03, 0x04, 0x01, 0x04, 0x02, 0x18, 0x18, 0x30, 0x0b, 0x40, 0x43, 0x7b, 0xf2, 0x17, 0xaa, 0x67, 0x77, 0x23, 0x22, 0xb8, + 0x7e, 0xcb, 0x9e, 0x94, 0x34, 0xd1, 0xe3, 0x0e, 0x0d, 0xca, 0x26, 0x09, 0x7e, 0x27, 0x9e, 0xff, 0x49, 0x70, 0x11, 0xe3, 0x81, + 0x7f, 0xfe, 0x6b, 0x2c, 0x1b, 0x7c, 0x51, 0xfa, 0xf4, 0xd8, 0x7f, 0x2d, 0xf4, 0x14, 0x35, 0x4d, 0x4b, 0xe1, 0x81, 0x0f, 0xf0, + 0x58, 0x6d, 0x36, 0xd6, 0x44, 0x63, 0xba, 0x4d, 0x1b, 0xad, 0x94, 0x55, 0x18 +}; +unsigned int UnitTest_NodeA3_crt_len = 265; + +unsigned char UnitTest_NodeA4_crt[] = { + 0x15, 0x30, 0x01, 0x08, 0x64, 0xa9, 0x21, 0xf7, 0x7e, 0xcd, 0x8c, 0x5e, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x14, 0x0a, + 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbf, 0xfa, 0x18, 0x26, 0x04, + 0x8c, 0xba, 0x07, 0x2a, 0x26, 0x05, 0x24, 0x4f, 0xa6, 0x4f, 0x37, 0x06, 0x26, 0x11, 0x33, 0x33, 0x44, 0x44, 0x27, 0x15, + 0x0a, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbf, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xe3, + 0x64, 0xa0, 0xf1, 0xb0, 0x00, 0xfd, 0xb1, 0x0b, 0x10, 0x0d, 0xd3, 0xd3, 0xa6, 0x89, 0x10, 0xb6, 0x01, 0xa1, 0xcf, 0xe7, + 0x5d, 0xa2, 0x3b, 0x70, 0xc8, 0xa0, 0x06, 0xe2, 0xbb, 0x0e, 0x6e, 0x34, 0x36, 0x9e, 0xce, 0xa2, 0x30, 0xc0, 0x55, 0xa8, + 0xfa, 0x6b, 0x83, 0x9f, 0x79, 0x41, 0x82, 0xbf, 0x4a, 0x85, 0xaf, 0x74, 0x0f, 0xc7, 0xd4, 0x56, 0xa7, 0xdd, 0x3e, 0xc8, + 0xca, 0x80, 0x2b, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x30, 0x04, 0x14, 0xe1, 0xea, 0xbd, 0xdd, 0x73, 0xb7, 0x50, + 0x07, 0xaa, 0x80, 0x32, 0xda, 0x74, 0xca, 0xc8, 0x68, 0xb1, 0x28, 0xde, 0x90, 0x30, 0x05, 0x14, 0x05, 0xf4, 0x81, 0x3b, + 0x07, 0xfc, 0xb2, 0x6e, 0x56, 0xc8, 0x56, 0x3c, 0x3b, 0x11, 0x97, 0x1f, 0xf6, 0xd1, 0xad, 0x1f, 0x24, 0x02, 0x01, 0x36, + 0x03, 0x04, 0x01, 0x04, 0x02, 0x18, 0x18, 0x30, 0x0b, 0x40, 0xc5, 0x14, 0x6c, 0x9a, 0x40, 0x97, 0x59, 0x17, 0x01, 0xa1, + 0xae, 0x31, 0x1a, 0x4a, 0x7f, 0xa6, 0xa5, 0xd3, 0x65, 0x11, 0xeb, 0xce, 0x11, 0x93, 0x4f, 0xcb, 0xbb, 0x9c, 0xc6, 0x06, + 0x6c, 0x7d, 0x50, 0x67, 0x99, 0xc3, 0x30, 0xe0, 0x19, 0x6f, 0xa8, 0x36, 0xd7, 0xde, 0x0d, 0x36, 0x4c, 0xea, 0xf8, 0x1d, + 0x94, 0xeb, 0x4a, 0xfb, 0xfb, 0xd5, 0x01, 0x46, 0x81, 0xb8, 0xb7, 0xb0, 0xb1, 0xa7, 0x18 +}; +unsigned int UnitTest_NodeA4_crt_len = 275; + +unsigned char UnitTest_NodeB1_crt[] = { + 0x15, 0x30, 0x01, 0x08, 0x0c, 0xfa, 0x9a, 0xd6, 0x9e, 0x78, 0xbd, 0x76, 0x24, 0x02, 0x01, 0x37, 0x03, 0x27, 0x13, 0xb1, 0x00, + 0x00, 0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, 0x26, 0x04, 0x8c, 0xba, 0x07, 0x2a, 0x26, 0x05, 0xa0, 0x4b, 0xa6, 0x4f, 0x37, 0x06, + 0x26, 0x11, 0x44, 0x33, 0x22, 0x11, 0x27, 0x15, 0x0b, 0x00, 0x00, 0x00, 0x00, 0xab, 0xbf, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, + 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xd9, 0xd1, 0x5c, 0x74, 0xa0, 0x9c, 0x12, 0xff, 0xbd, 0x20, 0x54, 0xe9, 0xba, 0xe5, 0xda, + 0xaf, 0x5e, 0xb8, 0x0e, 0xc9, 0xd9, 0x96, 0x86, 0xfa, 0xdc, 0xb3, 0xbe, 0xe4, 0x42, 0xa1, 0x19, 0x7a, 0xa1, 0xbf, 0x08, 0xc4, + 0x90, 0x62, 0xff, 0x80, 0x6c, 0xb8, 0xd1, 0xf3, 0xba, 0x4d, 0xd6, 0xe5, 0xe4, 0x6b, 0xab, 0x3c, 0x9d, 0x27, 0x39, 0x73, 0xf5, + 0xf8, 0xaf, 0x4c, 0x27, 0x0c, 0xf8, 0xd8, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x30, 0x04, 0x14, 0xf6, 0xe5, 0x82, 0x74, + 0x1a, 0x3c, 0x99, 0x50, 0x2c, 0x2a, 0x43, 0x6f, 0xf4, 0x7c, 0x2b, 0x0f, 0xab, 0xe4, 0x0a, 0xcd, 0x30, 0x05, 0x14, 0x09, 0x43, + 0x17, 0x10, 0x96, 0x73, 0x6a, 0x0b, 0xc8, 0xce, 0x27, 0x34, 0x2e, 0x43, 0x24, 0xb1, 0xca, 0x98, 0xcf, 0x5a, 0x24, 0x02, 0x01, + 0x36, 0x03, 0x04, 0x01, 0x04, 0x02, 0x18, 0x18, 0x30, 0x0b, 0x40, 0x46, 0x0f, 0xf9, 0x9a, 0xaa, 0x08, 0x2c, 0x10, 0x62, 0xec, + 0xb0, 0x79, 0x80, 0xef, 0x30, 0xd6, 0x81, 0x49, 0xb6, 0x34, 0x00, 0xac, 0x34, 0x4e, 0xcf, 0x34, 0x15, 0x89, 0x42, 0x77, 0x0f, + 0xc4, 0x4d, 0xc0, 0x15, 0x6c, 0x68, 0xa6, 0x44, 0x10, 0xa7, 0x4b, 0xef, 0x17, 0x02, 0x5a, 0x48, 0x2a, 0x42, 0x83, 0x75, 0x3c, + 0x37, 0x49, 0x28, 0xc2, 0x95, 0x28, 0xc9, 0x8e, 0xf2, 0xa8, 0xd2, 0x6a, 0x18 +}; +unsigned int UnitTest_NodeB1_crt_len = 265; + +// ======== End Generated Certs ======== + +// Following parts are generated by command: +// +// cat src/credentials/tests/certificates/keys | while read i; do +// chip-cert convert-key src/credentials/tests/certificates/$i /tmp/certs/tmp.chip +// base64 -d /tmp/certs/tmp.chip > /tmp/certs/$i +// xxd -i /tmp/certs/$i +// echo +// done >> src/credentials/tests/CHIPCert_unit_test_vectors.cpp +// +// With minor edit + +// ======== Begin Generated Keys ======== +unsigned char UnitTest_RootA_pem[] = { 0x04, 0x5b, 0xdd, 0x96, 0x58, 0x03, 0x5f, 0x6c, 0x26, 0x69, 0xe9, 0x27, 0xf0, 0xc1, + 0xab, 0xa0, 0x79, 0xd3, 0x23, 0x44, 0x83, 0xc1, 0x82, 0x39, 0x78, 0x4b, 0x1a, 0x0d, + 0x05, 0x7f, 0x62, 0xce, 0x72, 0x8c, 0xae, 0x3b, 0x9f, 0xef, 0x49, 0x18, 0xf0, 0xe8, + 0xe8, 0x3b, 0x6e, 0x98, 0x71, 0x81, 0x79, 0xb7, 0x8f, 0x66, 0x3a, 0x49, 0x0f, 0x7c, + 0x32, 0x0e, 0x5d, 0x8b, 0x7c, 0x76, 0x55, 0x6a, 0x2e, 0x88, 0x57, 0xb5, 0xf3, 0xa8, + 0xfa, 0xc4, 0x25, 0x86, 0x05, 0x18, 0x6c, 0xb7, 0xb7, 0xbf, 0x1f, 0x19, 0x06, 0x5d, + 0xd9, 0x65, 0x98, 0x65, 0xa7, 0x06, 0x0d, 0xeb, 0x94, 0xb5, 0x7b, 0x6d, 0xd5 }; +unsigned int UnitTest_RootA_pem_len = 97; + +unsigned char UnitTest_RootB_pem[] = { 0x04, 0x66, 0x90, 0x7a, 0xd6, 0x68, 0xee, 0x8a, 0xc8, 0xbf, 0x9e, 0x98, 0xba, 0xdb, + 0x15, 0x47, 0x18, 0x4e, 0x82, 0x6e, 0x5a, 0x22, 0x41, 0x96, 0x27, 0xe8, 0x5f, 0xc7, + 0x47, 0xaf, 0x74, 0xe4, 0x47, 0x44, 0x46, 0x9a, 0x63, 0xed, 0x21, 0x5f, 0x66, 0x85, + 0x2d, 0x0d, 0xfc, 0x23, 0x07, 0x83, 0x74, 0x8c, 0x9e, 0x98, 0x80, 0xe5, 0xcc, 0xd9, + 0x79, 0xd0, 0x67, 0x27, 0xeb, 0x45, 0xb3, 0x81, 0x55, 0x93, 0xca, 0xfd, 0x1f, 0xac, + 0x51, 0x2f, 0xa8, 0x7c, 0xc5, 0x97, 0x42, 0xbb, 0x1f, 0x0f, 0xfa, 0xe1, 0xbf, 0xd4, + 0x49, 0xfd, 0xbc, 0xa8, 0x81, 0x44, 0x01, 0x4d, 0x4d, 0xed, 0x1e, 0x0d, 0x0d }; +unsigned int UnitTest_RootB_pem_len = 97; + +unsigned char UnitTest_IA_A1_pem[] = { 0x04, 0x0b, 0x93, 0x13, 0x6f, 0xca, 0x1b, 0xc7, 0x38, 0x64, 0x5e, 0xc0, 0x80, 0x9e, + 0xaa, 0x07, 0xa7, 0x89, 0x99, 0x6b, 0x55, 0xfc, 0x65, 0xaa, 0xb1, 0x0c, 0x9f, 0xf9, + 0xa7, 0x6f, 0x07, 0x15, 0x78, 0xcf, 0x2f, 0xbd, 0xf4, 0xdc, 0x06, 0x82, 0xbb, 0x17, + 0xdb, 0xc9, 0x1e, 0x36, 0xa7, 0x2e, 0xa4, 0xc7, 0x44, 0xfe, 0xef, 0xf5, 0x34, 0xc3, + 0x44, 0x76, 0xda, 0xb4, 0xdb, 0xa2, 0xba, 0x03, 0xef, 0x57, 0x82, 0x57, 0x03, 0x46, + 0x65, 0x17, 0xa6, 0x97, 0xa7, 0x9e, 0x07, 0xb6, 0xe2, 0xdd, 0x74, 0xf5, 0x47, 0x02, + 0xb0, 0xb1, 0x9f, 0x5c, 0x38, 0x39, 0x9f, 0x7d, 0x45, 0xed, 0x21, 0xa2, 0x55 }; +unsigned int UnitTest_IA_A1_pem_len = 97; + +unsigned char UnitTest_IA_A2_pem[] = { 0x04, 0x56, 0x42, 0x98, 0x5c, 0x75, 0x68, 0x8c, 0x7e, 0xc3, 0x39, 0x8b, 0xf4, 0x1f, + 0xce, 0xa4, 0xb9, 0x8a, 0x3e, 0xd0, 0xa5, 0x8d, 0x14, 0x95, 0xb8, 0xf5, 0x39, 0x57, + 0x6d, 0x8c, 0xae, 0x3b, 0x7f, 0xa3, 0xb5, 0x27, 0xa7, 0xb4, 0x67, 0xa3, 0xd9, 0xbf, + 0x32, 0xd0, 0xae, 0xd4, 0x91, 0x6b, 0x35, 0xc4, 0x40, 0x9e, 0x48, 0x55, 0x5c, 0xa1, + 0x82, 0x2c, 0xec, 0x79, 0xfe, 0x65, 0xf9, 0x89, 0xdc, 0xff, 0x33, 0x15, 0x8f, 0xfa, + 0x10, 0x35, 0x4b, 0xac, 0xcc, 0x5f, 0xc3, 0x3c, 0x85, 0x43, 0x70, 0x92, 0x2f, 0xb5, + 0xd8, 0xd9, 0xea, 0x06, 0x7b, 0xa3, 0x14, 0xe9, 0xba, 0xbb, 0x4b, 0xd1, 0x4a }; +unsigned int UnitTest_IA_A2_pem_len = 97; + +unsigned char UnitTest_IA_B1_pem[] = { 0x04, 0x1e, 0x41, 0xba, 0xee, 0xbb, 0x08, 0x16, 0x58, 0xd4, 0x91, 0x78, 0x7c, 0x1b, + 0x1b, 0xea, 0x24, 0xb4, 0xc4, 0x14, 0x2f, 0x47, 0x86, 0xc3, 0x76, 0x13, 0xfb, 0xdb, + 0xdc, 0x1c, 0x65, 0xa9, 0xd0, 0xd2, 0x39, 0x7b, 0x2c, 0xa0, 0xa8, 0xfe, 0x2e, 0xee, + 0xcd, 0x35, 0xc0, 0xd6, 0x26, 0x9c, 0xc8, 0x34, 0x95, 0x44, 0xc8, 0xee, 0xf3, 0xe6, + 0x61, 0x39, 0xda, 0xc4, 0x84, 0x21, 0xbe, 0x1e, 0x89, 0xcd, 0x09, 0x80, 0x89, 0x25, + 0x72, 0x11, 0xfa, 0x6c, 0x5d, 0x81, 0x2c, 0xbc, 0x0e, 0xa7, 0x00, 0xa8, 0xb2, 0x40, + 0x56, 0x77, 0x97, 0xdc, 0xe5, 0xca, 0x56, 0xa2, 0xa4, 0x5a, 0x2b, 0xe6, 0xf3 }; +unsigned int UnitTest_IA_B1_pem_len = 97; + +unsigned char UnitTest_NodeA1_pem[] = { 0x04, 0x38, 0x9b, 0x9e, 0xc4, 0x9e, 0x84, 0x48, 0xc0, 0x8f, 0x34, 0x14, 0x9c, 0x3e, + 0xa9, 0x47, 0xd1, 0x49, 0xe2, 0xbb, 0xf5, 0x93, 0x93, 0x47, 0x5f, 0xa9, 0x16, 0x71, + 0x3a, 0xc7, 0x81, 0xd2, 0x73, 0xf8, 0xb5, 0x29, 0xb2, 0x8f, 0xbe, 0xba, 0x1e, 0x3a, + 0x27, 0xd1, 0x42, 0x67, 0xd4, 0x0c, 0x5e, 0xa7, 0x25, 0x4b, 0x62, 0x57, 0x7d, 0x00, + 0x30, 0x30, 0x27, 0xd8, 0xa8, 0x4f, 0xa1, 0x11, 0xa0, 0xe7, 0x8e, 0xa5, 0x02, 0xbd, + 0xc4, 0x75, 0x3c, 0x0b, 0x87, 0x68, 0xd4, 0x3b, 0x68, 0x17, 0x40, 0xca, 0x29, 0xc4, + 0x41, 0x63, 0xaa, 0xb8, 0x3a, 0x26, 0xfa, 0xa3, 0xf1, 0x4a, 0x11, 0x30, 0xff }; +unsigned int UnitTest_NodeA1_pem_len = 97; + +unsigned char UnitTest_NodeA2_pem[] = { 0x04, 0x5c, 0x1b, 0x09, 0xfc, 0x88, 0xf6, 0x2b, 0x91, 0xfa, 0xcb, 0x86, 0xef, 0x7d, + 0x79, 0x21, 0x09, 0x47, 0x06, 0xc9, 0xd9, 0x09, 0x8a, 0x2b, 0xa9, 0x39, 0x2b, 0xfc, + 0x2f, 0x57, 0x95, 0x96, 0xf2, 0xda, 0x1b, 0x79, 0x62, 0x52, 0xa9, 0xc6, 0xe4, 0x29, + 0xc6, 0x42, 0xe7, 0x21, 0xb4, 0x99, 0x24, 0x0f, 0x35, 0x04, 0xac, 0xcb, 0x84, 0x97, + 0x3a, 0xb7, 0xba, 0x80, 0xc9, 0xb8, 0x3f, 0x19, 0xc0, 0xfe, 0xd4, 0xd8, 0x1d, 0x30, + 0x3f, 0xb3, 0x04, 0x3a, 0xea, 0x3f, 0x8c, 0x80, 0xf8, 0x00, 0xb9, 0xd3, 0x60, 0x9f, + 0x22, 0x2f, 0xed, 0x19, 0xef, 0x82, 0x6b, 0x0d, 0xcd, 0xfa, 0x7d, 0x69, 0xe1 }; +unsigned int UnitTest_NodeA2_pem_len = 97; + +unsigned char UnitTest_NodeA3_pem[] = { 0x04, 0xdc, 0x86, 0xdf, 0x41, 0xfd, 0x7f, 0x64, 0x7b, 0x06, 0xf4, 0xc1, 0xaf, 0x96, + 0x97, 0xe8, 0x51, 0x85, 0x5b, 0x33, 0x6a, 0xeb, 0x04, 0x2b, 0x38, 0xf0, 0x2b, 0xec, + 0x46, 0x19, 0x1a, 0x92, 0x7a, 0xe8, 0x56, 0xec, 0xb3, 0x1e, 0x94, 0x81, 0x2e, 0x88, + 0xf0, 0xc3, 0xff, 0x25, 0xa0, 0x05, 0xfd, 0xcf, 0x65, 0xf7, 0xc2, 0x45, 0xbd, 0x5d, + 0xdc, 0xc0, 0xa7, 0x6d, 0x32, 0xac, 0xc0, 0xf0, 0xe2, 0xae, 0x05, 0x75, 0x7b, 0x88, + 0xeb, 0x87, 0x3b, 0x60, 0x68, 0x85, 0x60, 0xa4, 0xf8, 0x8b, 0xd1, 0x1c, 0x83, 0xa7, + 0xb9, 0x16, 0x34, 0x0a, 0xc2, 0xb1, 0xf8, 0x6f, 0x9f, 0xd9, 0x81, 0x3f, 0x82 }; +unsigned int UnitTest_NodeA3_pem_len = 97; + +unsigned char UnitTest_NodeA4_pem[] = { 0x04, 0xe3, 0x64, 0xa0, 0xf1, 0xb0, 0x00, 0xfd, 0xb1, 0x0b, 0x10, 0x0d, 0xd3, 0xd3, + 0xa6, 0x89, 0x10, 0xb6, 0x01, 0xa1, 0xcf, 0xe7, 0x5d, 0xa2, 0x3b, 0x70, 0xc8, 0xa0, + 0x06, 0xe2, 0xbb, 0x0e, 0x6e, 0x34, 0x36, 0x9e, 0xce, 0xa2, 0x30, 0xc0, 0x55, 0xa8, + 0xfa, 0x6b, 0x83, 0x9f, 0x79, 0x41, 0x82, 0xbf, 0x4a, 0x85, 0xaf, 0x74, 0x0f, 0xc7, + 0xd4, 0x56, 0xa7, 0xdd, 0x3e, 0xc8, 0xca, 0x80, 0x2b, 0xd9, 0x21, 0x3c, 0x75, 0xad, + 0x13, 0xc3, 0xf5, 0xb8, 0x91, 0xed, 0x02, 0x41, 0x73, 0xd0, 0x77, 0x93, 0xdc, 0xab, + 0x41, 0xa2, 0x26, 0x8d, 0x94, 0xd9, 0x0c, 0xe5, 0x65, 0x08, 0xea, 0xfb, 0xdf }; +unsigned int UnitTest_NodeA4_pem_len = 97; + +unsigned char UnitTest_NodeB1_pem[] = { 0x04, 0xd9, 0xd1, 0x5c, 0x74, 0xa0, 0x9c, 0x12, 0xff, 0xbd, 0x20, 0x54, 0xe9, 0xba, + 0xe5, 0xda, 0xaf, 0x5e, 0xb8, 0x0e, 0xc9, 0xd9, 0x96, 0x86, 0xfa, 0xdc, 0xb3, 0xbe, + 0xe4, 0x42, 0xa1, 0x19, 0x7a, 0xa1, 0xbf, 0x08, 0xc4, 0x90, 0x62, 0xff, 0x80, 0x6c, + 0xb8, 0xd1, 0xf3, 0xba, 0x4d, 0xd6, 0xe5, 0xe4, 0x6b, 0xab, 0x3c, 0x9d, 0x27, 0x39, + 0x73, 0xf5, 0xf8, 0xaf, 0x4c, 0x27, 0x0c, 0xf8, 0xd8, 0xc9, 0xfa, 0x18, 0x2e, 0x62, + 0xb5, 0xd0, 0x0d, 0xbd, 0x79, 0x50, 0x94, 0x1f, 0x49, 0xfb, 0x67, 0xfd, 0x74, 0x1f, + 0xa1, 0x3b, 0x65, 0xb2, 0xac, 0x47, 0xd8, 0x5e, 0x6f, 0x0c, 0x56, 0xfb, 0x49 }; +unsigned int UnitTest_NodeB1_pem_len = 97; + +// ======== End Generated Keys ======== + +UnitTestCertAsset GetRootACertAsset() +{ + return { ByteSpan(UnitTest_RootA_crt, UnitTest_RootA_crt_len), ByteSpan(UnitTest_RootA_pem, UnitTest_RootA_pem_len) }; +} +UnitTestCertAsset GetRootBCertAsset() +{ + return { ByteSpan(UnitTest_RootB_crt, UnitTest_RootB_crt_len), ByteSpan(UnitTest_RootB_pem, UnitTest_RootB_pem_len) }; +} +UnitTestCertAsset GetIAA1CertAsset() +{ + return { ByteSpan(UnitTest_IA_A1_crt, UnitTest_IA_A1_crt_len), ByteSpan(UnitTest_IA_A1_pem, UnitTest_IA_A1_pem_len) }; +} +UnitTestCertAsset GetIAA2CertAsset() +{ + return { ByteSpan(UnitTest_IA_A2_crt, UnitTest_IA_A2_crt_len), ByteSpan(UnitTest_IA_A2_pem, UnitTest_IA_A2_pem_len) }; +} +UnitTestCertAsset GetIAB1CertAsset() +{ + return { ByteSpan(UnitTest_IA_B1_crt, UnitTest_IA_B1_crt_len), ByteSpan(UnitTest_IA_B1_pem, UnitTest_IA_B1_pem_len) }; +} +UnitTestCertAsset GetNodeA1CertAsset() +{ + return { ByteSpan(UnitTest_NodeA1_crt, UnitTest_NodeA1_crt_len), ByteSpan(UnitTest_NodeA1_pem, UnitTest_NodeA1_pem_len) }; +} +UnitTestCertAsset GetNodeA2CertAsset() +{ + return { ByteSpan(UnitTest_NodeA2_crt, UnitTest_NodeA2_crt_len), ByteSpan(UnitTest_NodeA2_pem, UnitTest_NodeA2_pem_len) }; +} +UnitTestCertAsset GetNodeA3CertAsset() +{ + return { ByteSpan(UnitTest_NodeA3_crt, UnitTest_NodeA3_crt_len), ByteSpan(UnitTest_NodeA3_pem, UnitTest_NodeA3_pem_len) }; +} +UnitTestCertAsset GetNodeA4CertAsset() +{ + return { ByteSpan(UnitTest_NodeA4_crt, UnitTest_NodeA4_crt_len), ByteSpan(UnitTest_NodeA4_pem, UnitTest_NodeA4_pem_len) }; +} +UnitTestCertAsset GetNodeB1CertAsset() +{ + return { ByteSpan(UnitTest_NodeB1_crt, UnitTest_NodeB1_crt_len), ByteSpan(UnitTest_NodeB1_pem, UnitTest_NodeB1_pem_len) }; +} + +} // namespace TestCerts +} // namespace chip diff --git a/src/credentials/tests/CHIPCert_unit_test_vectors.h b/src/credentials/tests/CHIPCert_unit_test_vectors.h new file mode 100644 index 00000000000000..a24cf3b1d1bd21 --- /dev/null +++ b/src/credentials/tests/CHIPCert_unit_test_vectors.h @@ -0,0 +1,56 @@ +/* + * 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. + */ + +#pragma once + +#include + +namespace chip { +namespace TestCerts { + +// Cert Hierarchy +// +// RootA RootB +// | | +// +---------+-+-------+ | +// | | | | +// IA_A1 IA_A2 NodeA4 IA_B1 +// | | | +// +--+--+ | | +// | | | | +// NodeA1 NodeA2 NodeA3 NodeB1 + +struct UnitTestCertAsset +{ + UnitTestCertAsset(ByteSpan cert, ByteSpan key) : mCert(cert), mKey(key) {} + ByteSpan mCert; + ByteSpan mKey; +}; + +UnitTestCertAsset GetRootACertAsset(); +UnitTestCertAsset GetRootBCertAsset(); +UnitTestCertAsset GetIAA1CertAsset(); +UnitTestCertAsset GetIAA2CertAsset(); +UnitTestCertAsset GetIAB1CertAsset(); +UnitTestCertAsset GetNodeA1CertAsset(); +UnitTestCertAsset GetNodeA2CertAsset(); +UnitTestCertAsset GetNodeA3CertAsset(); +UnitTestCertAsset GetNodeA4CertAsset(); +UnitTestCertAsset GetNodeB1CertAsset(); + +} // namespace TestCerts +} // namespace chip diff --git a/src/credentials/tests/certificates/UnitTest_IA_A1.crt b/src/credentials/tests/certificates/UnitTest_IA_A1.crt new file mode 100644 index 00000000000000..3469eee73abcbb --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_A1.crt @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBvjCCAWWgAwIBAgIILp+IWbUMKiYwCgYIKoZIzj0EAwIwRDEgMB4GCisGAQQB +gqJ8AQQMEENBQ0FDQUNBMDAwMDAwMEExIDAeBgorBgEEAYKifAEFDBBGQUJGQUIw +MDAwMDAwMDBBMB4XDTIyMDUwNjEwMTQwMFoXDTQyMDUwNjEwMTQwMFowIjEgMB4G +CisGAQQBgqJ8AQMMEDBBMEEwQTBBMDAwMDAwQTEwWTATBgcqhkjOPQIBBggqhkjO +PQMBBwNCAAQLkxNvyhvHOGRewICeqgeniZlrVfxlqrEMn/mnbwcVeM8vvfTcBoK7 +F9vJHjanLqTHRP7v9TTDRHbatNuiugPvo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0G +A1UdDgQWBBTUZBirTON+acvhE6HpqEpjc5RyEDAfBgNVHSMEGDAWgBQF9IE7B/yy +blbIVjw7EZcf9tGtHzAOBgNVHQ8BAf8EBAMCAQYwCgYIKoZIzj0EAwIDRwAwRAIg +bhDFV4gclraoEvM04VkmbrVgLlA7SVnnHfM4Qpwl7TICIEXaWjIdckcZqaDtkQrR +CK39tOYd0EQG4r7Rq2kwQXEC +-----END CERTIFICATE----- diff --git a/src/credentials/tests/certificates/UnitTest_IA_A1.crt.txt b/src/credentials/tests/certificates/UnitTest_IA_A1.crt.txt new file mode 100644 index 00000000000000..26e9f6baaa6b56 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_A1.crt.txt @@ -0,0 +1,36 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 3359553765912619558 (0x2e9f8859b50c2a26) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: 1.3.6.1.4.1.37244.1.4 = CACACACA0000000A, 1.3.6.1.4.1.37244.1.5 = FABFAB000000000A + Validity + Not Before: May 6 10:14:00 2022 GMT + Not After : May 6 10:14:00 2042 GMT + Subject: 1.3.6.1.4.1.37244.1.3 = 0A0A0A0A000000A1 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:0b:93:13:6f:ca:1b:c7:38:64:5e:c0:80:9e:aa: + 07:a7:89:99:6b:55:fc:65:aa:b1:0c:9f:f9:a7:6f: + 07:15:78:cf:2f:bd:f4:dc:06:82:bb:17:db:c9:1e: + 36:a7:2e:a4:c7:44:fe:ef:f5:34:c3:44:76:da:b4: + db:a2:ba:03:ef + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + D4:64:18:AB:4C:E3:7E:69:CB:E1:13:A1:E9:A8:4A:63:73:94:72:10 + X509v3 Authority Key Identifier: + keyid:05:F4:81:3B:07:FC:B2:6E:56:C8:56:3C:3B:11:97:1F:F6:D1:AD:1F + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA256 + 30:44:02:20:6e:10:c5:57:88:1c:96:b6:a8:12:f3:34:e1:59: + 26:6e:b5:60:2e:50:3b:49:59:e7:1d:f3:38:42:9c:25:ed:32: + 02:20:45:da:5a:32:1d:72:47:19:a9:a0:ed:91:0a:d1:08:ad: + fd:b4:e6:1d:d0:44:06:e2:be:d1:ab:69:30:41:71:02 diff --git a/src/credentials/tests/certificates/UnitTest_IA_A1.pem b/src/credentials/tests/certificates/UnitTest_IA_A1.pem new file mode 100644 index 00000000000000..d9bb481c5095d5 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_A1.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIFeCVwNGZReml6eeB7bi3XT1RwKwsZ9cODmffUXtIaJVoAoGCCqGSM49 +AwEHoUQDQgAEC5MTb8obxzhkXsCAnqoHp4mZa1X8ZaqxDJ/5p28HFXjPL7303AaC +uxfbyR42py6kx0T+7/U0w0R22rTboroD7w== +-----END EC PRIVATE KEY----- diff --git a/src/credentials/tests/certificates/UnitTest_IA_A1.pem.txt b/src/credentials/tests/certificates/UnitTest_IA_A1.pem.txt new file mode 100644 index 00000000000000..e3a0a9f8f05771 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_A1.pem.txt @@ -0,0 +1,13 @@ +Private-Key: (256 bit) +priv: + 57:82:57:03:46:65:17:a6:97:a7:9e:07:b6:e2:dd: + 74:f5:47:02:b0:b1:9f:5c:38:39:9f:7d:45:ed:21: + a2:55 +pub: + 04:0b:93:13:6f:ca:1b:c7:38:64:5e:c0:80:9e:aa: + 07:a7:89:99:6b:55:fc:65:aa:b1:0c:9f:f9:a7:6f: + 07:15:78:cf:2f:bd:f4:dc:06:82:bb:17:db:c9:1e: + 36:a7:2e:a4:c7:44:fe:ef:f5:34:c3:44:76:da:b4: + db:a2:ba:03:ef +ASN1 OID: prime256v1 +NIST CURVE: P-256 diff --git a/src/credentials/tests/certificates/UnitTest_IA_A2.crt b/src/credentials/tests/certificates/UnitTest_IA_A2.crt new file mode 100644 index 00000000000000..de3d0c36d2504a --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_A2.crt @@ -0,0 +1,12 @@ +-----BEGIN CERTIFICATE----- +MIIBvzCCAWWgAwIBAgIIEXyc3HIbZKkwCgYIKoZIzj0EAwIwRDEgMB4GCisGAQQB +gqJ8AQQMEENBQ0FDQUNBMDAwMDAwMEExIDAeBgorBgEEAYKifAEFDBBGQUJGQUIw +MDAwMDAwMDBBMB4XDTIyMDUwNjEwMTUwMFoXDTQyMDUwNjEwMTUwMFowIjEgMB4G +CisGAQQBgqJ8AQMMEDBBMEEwQTBBMDAwMDAwQTIwWTATBgcqhkjOPQIBBggqhkjO +PQMBBwNCAARWQphcdWiMfsM5i/QfzqS5ij7QpY0Ulbj1OVdtjK47f6O1J6e0Z6PZ +vzLQrtSRazXEQJ5IVVyhgizsef5l+Ynco2MwYTAPBgNVHRMBAf8EBTADAQH/MB0G +A1UdDgQWBBQPhEz2hHM97GyL6yiVS74bidOnbDAfBgNVHSMEGDAWgBQF9IE7B/yy +blbIVjw7EZcf9tGtHzAOBgNVHQ8BAf8EBAMCAQYwCgYIKoZIzj0EAwIDSAAwRQIh +APq43yzKSJt/f8/vwRultyVIP6DvbWL+A9bNg46GVXNjAiBleBLoDje5izciHZfT +v6BGcUyCzcpJisM39qMAQAFtJg== +-----END CERTIFICATE----- diff --git a/src/credentials/tests/certificates/UnitTest_IA_A2.crt.txt b/src/credentials/tests/certificates/UnitTest_IA_A2.crt.txt new file mode 100644 index 00000000000000..c0adf05a6943ea --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_A2.crt.txt @@ -0,0 +1,36 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1260054466378032297 (0x117c9cdc721b64a9) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: 1.3.6.1.4.1.37244.1.4 = CACACACA0000000A, 1.3.6.1.4.1.37244.1.5 = FABFAB000000000A + Validity + Not Before: May 6 10:15:00 2022 GMT + Not After : May 6 10:15:00 2042 GMT + Subject: 1.3.6.1.4.1.37244.1.3 = 0A0A0A0A000000A2 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:56:42:98:5c:75:68:8c:7e:c3:39:8b:f4:1f:ce: + a4:b9:8a:3e:d0:a5:8d:14:95:b8:f5:39:57:6d:8c: + ae:3b:7f:a3:b5:27:a7:b4:67:a3:d9:bf:32:d0:ae: + d4:91:6b:35:c4:40:9e:48:55:5c:a1:82:2c:ec:79: + fe:65:f9:89:dc + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 0F:84:4C:F6:84:73:3D:EC:6C:8B:EB:28:95:4B:BE:1B:89:D3:A7:6C + X509v3 Authority Key Identifier: + keyid:05:F4:81:3B:07:FC:B2:6E:56:C8:56:3C:3B:11:97:1F:F6:D1:AD:1F + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA256 + 30:45:02:21:00:fa:b8:df:2c:ca:48:9b:7f:7f:cf:ef:c1:1b: + a5:b7:25:48:3f:a0:ef:6d:62:fe:03:d6:cd:83:8e:86:55:73: + 63:02:20:65:78:12:e8:0e:37:b9:8b:37:22:1d:97:d3:bf:a0: + 46:71:4c:82:cd:ca:49:8a:c3:37:f6:a3:00:40:01:6d:26 diff --git a/src/credentials/tests/certificates/UnitTest_IA_A2.pem b/src/credentials/tests/certificates/UnitTest_IA_A2.pem new file mode 100644 index 00000000000000..078f4ff0d4a81b --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_A2.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIP8zFY/6EDVLrMxfwzyFQ3CSL7XY2eoGe6MU6bq7S9FKoAoGCCqGSM49 +AwEHoUQDQgAEVkKYXHVojH7DOYv0H86kuYo+0KWNFJW49TlXbYyuO3+jtSentGej +2b8y0K7UkWs1xECeSFVcoYIs7Hn+ZfmJ3A== +-----END EC PRIVATE KEY----- diff --git a/src/credentials/tests/certificates/UnitTest_IA_A2.pem.txt b/src/credentials/tests/certificates/UnitTest_IA_A2.pem.txt new file mode 100644 index 00000000000000..659161a8e989ab --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_A2.pem.txt @@ -0,0 +1,13 @@ +Private-Key: (256 bit) +priv: + ff:33:15:8f:fa:10:35:4b:ac:cc:5f:c3:3c:85:43: + 70:92:2f:b5:d8:d9:ea:06:7b:a3:14:e9:ba:bb:4b: + d1:4a +pub: + 04:56:42:98:5c:75:68:8c:7e:c3:39:8b:f4:1f:ce: + a4:b9:8a:3e:d0:a5:8d:14:95:b8:f5:39:57:6d:8c: + ae:3b:7f:a3:b5:27:a7:b4:67:a3:d9:bf:32:d0:ae: + d4:91:6b:35:c4:40:9e:48:55:5c:a1:82:2c:ec:79: + fe:65:f9:89:dc +ASN1 OID: prime256v1 +NIST CURVE: P-256 diff --git a/src/credentials/tests/certificates/UnitTest_IA_B1.crt b/src/credentials/tests/certificates/UnitTest_IA_B1.crt new file mode 100644 index 00000000000000..696eea14fdcc77 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_B1.crt @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE----- +MIIBnTCCAUOgAwIBAgIIG7E8ejrKdOIwCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB +gqJ8AQQMEENBQ0FDQUNBMDAwMDAwMEIwHhcNMjIwNTA2MTAxNDAwWhcNNDIwNTA2 +MTAwMDAwWjAiMSAwHgYKKwYBBAGConwBAwwQMEEwQTBBMEEwMDAwMDBCMTBZMBMG +ByqGSM49AgEGCCqGSM49AwEHA0IABB5Buu67CBZY1JF4fBsb6iS0xBQvR4bDdhP7 +29wcZanQ0jl7LKCo/i7uzTXA1iacyDSVRMju8+ZhOdrEhCG+HomjYzBhMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFAlDFxCWc2oLyM4nNC5DJLHKmM9aMB8GA1Ud +IwQYMBaAFLmtV5282Vo/NAcXjwQCW0ApEr2pMA4GA1UdDwEB/wQEAwIBBjAKBggq +hkjOPQQDAgNIADBFAiEAthnIgJm/XhfUPewiASwAuTesfmvtDBp7dQkNp7LesVgC +IBy5BGFWpE//MdvkKiKR+YxwzVm53ESeor2Acjd7Cn0r +-----END CERTIFICATE----- diff --git a/src/credentials/tests/certificates/UnitTest_IA_B1.crt.txt b/src/credentials/tests/certificates/UnitTest_IA_B1.crt.txt new file mode 100644 index 00000000000000..9c46fff5c54478 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_B1.crt.txt @@ -0,0 +1,36 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 1995442605571863778 (0x1bb13c7a3aca74e2) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: 1.3.6.1.4.1.37244.1.4 = CACACACA0000000B + Validity + Not Before: May 6 10:14:00 2022 GMT + Not After : May 6 10:00:00 2042 GMT + Subject: 1.3.6.1.4.1.37244.1.3 = 0A0A0A0A000000B1 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:1e:41:ba:ee:bb:08:16:58:d4:91:78:7c:1b:1b: + ea:24:b4:c4:14:2f:47:86:c3:76:13:fb:db:dc:1c: + 65:a9:d0:d2:39:7b:2c:a0:a8:fe:2e:ee:cd:35:c0: + d6:26:9c:c8:34:95:44:c8:ee:f3:e6:61:39:da:c4: + 84:21:be:1e:89 + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 09:43:17:10:96:73:6A:0B:C8:CE:27:34:2E:43:24:B1:CA:98:CF:5A + X509v3 Authority Key Identifier: + keyid:B9:AD:57:9D:BC:D9:5A:3F:34:07:17:8F:04:02:5B:40:29:12:BD:A9 + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA256 + 30:45:02:21:00:b6:19:c8:80:99:bf:5e:17:d4:3d:ec:22:01: + 2c:00:b9:37:ac:7e:6b:ed:0c:1a:7b:75:09:0d:a7:b2:de:b1: + 58:02:20:1c:b9:04:61:56:a4:4f:ff:31:db:e4:2a:22:91:f9: + 8c:70:cd:59:b9:dc:44:9e:a2:bd:80:72:37:7b:0a:7d:2b diff --git a/src/credentials/tests/certificates/UnitTest_IA_B1.pem b/src/credentials/tests/certificates/UnitTest_IA_B1.pem new file mode 100644 index 00000000000000..fd15759a1729ec --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_B1.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIM0JgIklchH6bF2BLLwOpwCoskBWd5fc5cpWoqRaK+bzoAoGCCqGSM49 +AwEHoUQDQgAEHkG67rsIFljUkXh8GxvqJLTEFC9HhsN2E/vb3BxlqdDSOXssoKj+ +Lu7NNcDWJpzINJVEyO7z5mE52sSEIb4eiQ== +-----END EC PRIVATE KEY----- diff --git a/src/credentials/tests/certificates/UnitTest_IA_B1.pem.txt b/src/credentials/tests/certificates/UnitTest_IA_B1.pem.txt new file mode 100644 index 00000000000000..9267058ac44014 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_IA_B1.pem.txt @@ -0,0 +1,13 @@ +Private-Key: (256 bit) +priv: + cd:09:80:89:25:72:11:fa:6c:5d:81:2c:bc:0e:a7: + 00:a8:b2:40:56:77:97:dc:e5:ca:56:a2:a4:5a:2b: + e6:f3 +pub: + 04:1e:41:ba:ee:bb:08:16:58:d4:91:78:7c:1b:1b: + ea:24:b4:c4:14:2f:47:86:c3:76:13:fb:db:dc:1c: + 65:a9:d0:d2:39:7b:2c:a0:a8:fe:2e:ee:cd:35:c0: + d6:26:9c:c8:34:95:44:c8:ee:f3:e6:61:39:da:c4: + 84:21:be:1e:89 +ASN1 OID: prime256v1 +NIST CURVE: P-256 diff --git a/src/credentials/tests/certificates/UnitTest_NodeA1.crt b/src/credentials/tests/certificates/UnitTest_NodeA1.crt new file mode 100644 index 00000000000000..5da7932b030422 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA1.crt @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB4DCCAYagAwIBAgIICbqltouEcdgwCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB +gqJ8AQMMEDBBMEEwQTBBMDAwMDAwQTEwHhcNMjIwNTA2MTAxODAwWhcNNDIwNTA2 +MTAxODAwWjBEMSAwHgYKKwYBBAGConwBAQwQMDAwMDAwMDAxMTIyMzM0NDEgMB4G +CisGAQQBgqJ8AQUMEEZBQkZBQjAwMDAwMDAwMEEwWTATBgcqhkjOPQIBBggqhkjO +PQMBBwNCAAQ4m57EnoRIwI80FJw+qUfRSeK79ZOTR1+pFnE6x4HSc/i1KbKPvroe +OifRQmfUDF6nJUtiV30AMDAn2KhPoRGgo4GDMIGAMAwGA1UdEwEB/wQCMAAwHQYD +VR0OBBYEFGmN++1KrE3nOJXGT75eb+7Om/lZMB8GA1UdIwQYMBaAFNRkGKtM435p +y+EToemoSmNzlHIQMA4GA1UdDwEB/wQEAwIHgDAgBgNVHSUBAf8EFjAUBggrBgEF +BQcDAQYIKwYBBQUHAwIwCgYIKoZIzj0EAwIDSAAwRQIhALqewwF6EhqLcv2ax08A +aJihKF1W/IrZT1ZVb2srlB8cAiAa3WZELeXGjq5SwKRTvVCkX7VqlnprwnQ8VIHi +HEoEFA== +-----END CERTIFICATE----- diff --git a/src/credentials/tests/certificates/UnitTest_NodeA1.crt.txt b/src/credentials/tests/certificates/UnitTest_NodeA1.crt.txt new file mode 100644 index 00000000000000..4e3dbbf76b1356 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA1.crt.txt @@ -0,0 +1,38 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 701054895452877272 (0x9baa5b68b8471d8) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: 1.3.6.1.4.1.37244.1.3 = 0A0A0A0A000000A1 + Validity + Not Before: May 6 10:18:00 2022 GMT + Not After : May 6 10:18:00 2042 GMT + Subject: 1.3.6.1.4.1.37244.1.1 = 0000000011223344, 1.3.6.1.4.1.37244.1.5 = FABFAB000000000A + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:38:9b:9e:c4:9e:84:48:c0:8f:34:14:9c:3e:a9: + 47:d1:49:e2:bb:f5:93:93:47:5f:a9:16:71:3a:c7: + 81:d2:73:f8:b5:29:b2:8f:be:ba:1e:3a:27:d1:42: + 67:d4:0c:5e:a7:25:4b:62:57:7d:00:30:30:27:d8: + a8:4f:a1:11:a0 + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:FALSE + X509v3 Subject Key Identifier: + 69:8D:FB:ED:4A:AC:4D:E7:38:95:C6:4F:BE:5E:6F:EE:CE:9B:F9:59 + X509v3 Authority Key Identifier: + keyid:D4:64:18:AB:4C:E3:7E:69:CB:E1:13:A1:E9:A8:4A:63:73:94:72:10 + + X509v3 Key Usage: critical + Digital Signature + X509v3 Extended Key Usage: critical + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: ecdsa-with-SHA256 + 30:45:02:21:00:ba:9e:c3:01:7a:12:1a:8b:72:fd:9a:c7:4f: + 00:68:98:a1:28:5d:56:fc:8a:d9:4f:56:55:6f:6b:2b:94:1f: + 1c:02:20:1a:dd:66:44:2d:e5:c6:8e:ae:52:c0:a4:53:bd:50: + a4:5f:b5:6a:96:7a:6b:c2:74:3c:54:81:e2:1c:4a:04:14 diff --git a/src/credentials/tests/certificates/UnitTest_NodeA1.pem b/src/credentials/tests/certificates/UnitTest_NodeA1.pem new file mode 100644 index 00000000000000..be2d83c0d8faa1 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA1.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIOeOpQK9xHU8C4do1DtoF0DKKcRBY6q4Oib6o/FKETD/oAoGCCqGSM49 +AwEHoUQDQgAEOJuexJ6ESMCPNBScPqlH0Uniu/WTk0dfqRZxOseB0nP4tSmyj766 +Hjon0UJn1AxepyVLYld9ADAwJ9ioT6ERoA== +-----END EC PRIVATE KEY----- diff --git a/src/credentials/tests/certificates/UnitTest_NodeA1.pem.txt b/src/credentials/tests/certificates/UnitTest_NodeA1.pem.txt new file mode 100644 index 00000000000000..5654175d03e366 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA1.pem.txt @@ -0,0 +1,13 @@ +Private-Key: (256 bit) +priv: + e7:8e:a5:02:bd:c4:75:3c:0b:87:68:d4:3b:68:17: + 40:ca:29:c4:41:63:aa:b8:3a:26:fa:a3:f1:4a:11: + 30:ff +pub: + 04:38:9b:9e:c4:9e:84:48:c0:8f:34:14:9c:3e:a9: + 47:d1:49:e2:bb:f5:93:93:47:5f:a9:16:71:3a:c7: + 81:d2:73:f8:b5:29:b2:8f:be:ba:1e:3a:27:d1:42: + 67:d4:0c:5e:a7:25:4b:62:57:7d:00:30:30:27:d8: + a8:4f:a1:11:a0 +ASN1 OID: prime256v1 +NIST CURVE: P-256 diff --git a/src/credentials/tests/certificates/UnitTest_NodeA2.crt b/src/credentials/tests/certificates/UnitTest_NodeA2.crt new file mode 100644 index 00000000000000..9e794cb7e85f4a --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA2.crt @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB4TCCAYagAwIBAgIIIayBnZFg9vAwCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB +gqJ8AQMMEDBBMEEwQTBBMDAwMDAwQTEwHhcNMjIwNTA2MTAxODAwWhcNNDIwNTA2 +MTAxODAwWjBEMSAwHgYKKwYBBAGConwBAQwQMDAwMDAwMDAxMjM0NDMyMTEgMB4G +CisGAQQBgqJ8AQUMEEZBQkZBQjAwMDAwMDAwMEEwWTATBgcqhkjOPQIBBggqhkjO +PQMBBwNCAARcGwn8iPYrkfrLhu99eSEJRwbJ2QmKK6k5K/wvV5WW8tobeWJSqcbk +KcZC5yG0mSQPNQSsy4SXOre6gMm4PxnAo4GDMIGAMAwGA1UdEwEB/wQCMAAwHQYD +VR0OBBYEFPsOgoqRbRoPaulyH9YRw8q9b+a6MB8GA1UdIwQYMBaAFNRkGKtM435p +y+EToemoSmNzlHIQMA4GA1UdDwEB/wQEAwIHgDAgBgNVHSUBAf8EFjAUBggrBgEF +BQcDAQYIKwYBBQUHAwIwCgYIKoZIzj0EAwIDSQAwRgIhAP1s1lZraX87O17wNjV4 +Li0JzaH1pZZq89xNTdteKmrUAiEAvhyJ3ibp2AGMZWzMZ+yrsaXADZVOChL9AK1O +u6WZ5zc= +-----END CERTIFICATE----- diff --git a/src/credentials/tests/certificates/UnitTest_NodeA2.crt.txt b/src/credentials/tests/certificates/UnitTest_NodeA2.crt.txt new file mode 100644 index 00000000000000..4f62d2cff2ded6 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA2.crt.txt @@ -0,0 +1,38 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2426456812994754288 (0x21ac819d9160f6f0) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: 1.3.6.1.4.1.37244.1.3 = 0A0A0A0A000000A1 + Validity + Not Before: May 6 10:18:00 2022 GMT + Not After : May 6 10:18:00 2042 GMT + Subject: 1.3.6.1.4.1.37244.1.1 = 0000000012344321, 1.3.6.1.4.1.37244.1.5 = FABFAB000000000A + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:5c:1b:09:fc:88:f6:2b:91:fa:cb:86:ef:7d:79: + 21:09:47:06:c9:d9:09:8a:2b:a9:39:2b:fc:2f:57: + 95:96:f2:da:1b:79:62:52:a9:c6:e4:29:c6:42:e7: + 21:b4:99:24:0f:35:04:ac:cb:84:97:3a:b7:ba:80: + c9:b8:3f:19:c0 + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:FALSE + X509v3 Subject Key Identifier: + FB:0E:82:8A:91:6D:1A:0F:6A:E9:72:1F:D6:11:C3:CA:BD:6F:E6:BA + X509v3 Authority Key Identifier: + keyid:D4:64:18:AB:4C:E3:7E:69:CB:E1:13:A1:E9:A8:4A:63:73:94:72:10 + + X509v3 Key Usage: critical + Digital Signature + X509v3 Extended Key Usage: critical + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: ecdsa-with-SHA256 + 30:46:02:21:00:fd:6c:d6:56:6b:69:7f:3b:3b:5e:f0:36:35: + 78:2e:2d:09:cd:a1:f5:a5:96:6a:f3:dc:4d:4d:db:5e:2a:6a: + d4:02:21:00:be:1c:89:de:26:e9:d8:01:8c:65:6c:cc:67:ec: + ab:b1:a5:c0:0d:95:4e:0a:12:fd:00:ad:4e:bb:a5:99:e7:37 diff --git a/src/credentials/tests/certificates/UnitTest_NodeA2.pem b/src/credentials/tests/certificates/UnitTest_NodeA2.pem new file mode 100644 index 00000000000000..d237cc3acace22 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA2.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIP7U2B0wP7MEOuo/jID4ALnTYJ8iL+0Z74JrDc36fWnhoAoGCCqGSM49 +AwEHoUQDQgAEXBsJ/Ij2K5H6y4bvfXkhCUcGydkJiiupOSv8L1eVlvLaG3liUqnG +5CnGQuchtJkkDzUErMuElzq3uoDJuD8ZwA== +-----END EC PRIVATE KEY----- diff --git a/src/credentials/tests/certificates/UnitTest_NodeA2.pem.txt b/src/credentials/tests/certificates/UnitTest_NodeA2.pem.txt new file mode 100644 index 00000000000000..d64eab029fbda8 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA2.pem.txt @@ -0,0 +1,13 @@ +Private-Key: (256 bit) +priv: + fe:d4:d8:1d:30:3f:b3:04:3a:ea:3f:8c:80:f8:00: + b9:d3:60:9f:22:2f:ed:19:ef:82:6b:0d:cd:fa:7d: + 69:e1 +pub: + 04:5c:1b:09:fc:88:f6:2b:91:fa:cb:86:ef:7d:79: + 21:09:47:06:c9:d9:09:8a:2b:a9:39:2b:fc:2f:57: + 95:96:f2:da:1b:79:62:52:a9:c6:e4:29:c6:42:e7: + 21:b4:99:24:0f:35:04:ac:cb:84:97:3a:b7:ba:80: + c9:b8:3f:19:c0 +ASN1 OID: prime256v1 +NIST CURVE: P-256 diff --git a/src/credentials/tests/certificates/UnitTest_NodeA3.crt b/src/credentials/tests/certificates/UnitTest_NodeA3.crt new file mode 100644 index 00000000000000..086d5d1799462d --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA3.crt @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB4DCCAYagAwIBAgIIam58AifnhUQwCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB +gqJ8AQMMEDBBMEEwQTBBMDAwMDAwQTIwHhcNMjIwNTA2MTAxODAwWhcNNDIwNTA2 +MTAxNTAwWjBEMSAwHgYKKwYBBAGConwBAQwQMDAwMDAwMDAzMzMzNDQ0NDEgMB4G +CisGAQQBgqJ8AQUMEEZBQkZBQjAwMDAwMDAwMEEwWTATBgcqhkjOPQIBBggqhkjO +PQMBBwNCAATcht9B/X9kewb0wa+Wl+hRhVszausEKzjwK+xGGRqSeuhW7LMelIEu +iPDD/yWgBf3PZffCRb1d3MCnbTKswPDio4GDMIGAMAwGA1UdEwEB/wQCMAAwHQYD +VR0OBBYEFP8JvyKpMMNS7ihDppvj4YqPCG4FMB8GA1UdIwQYMBaAFA+ETPaEcz3s +bIvrKJVLvhuJ06dsMA4GA1UdDwEB/wQEAwIHgDAgBgNVHSUBAf8EFjAUBggrBgEF +BQcDAQYIKwYBBQUHAwIwCgYIKoZIzj0EAwIDSAAwRQIgQ3vyF6pndyMiuH7LnpQ0 +0eMODcomCX4nnv9JcBHjgX8CIQD+aywbfFH69Nh/LfQUNU1L4YEP8FhtNtZEY7pN +G62UVQ== +-----END CERTIFICATE----- diff --git a/src/credentials/tests/certificates/UnitTest_NodeA3.crt.txt b/src/credentials/tests/certificates/UnitTest_NodeA3.crt.txt new file mode 100644 index 00000000000000..51fbc33dbaf658 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA3.crt.txt @@ -0,0 +1,38 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 7669203564159796548 (0x6a6e7c0227e78544) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: 1.3.6.1.4.1.37244.1.3 = 0A0A0A0A000000A2 + Validity + Not Before: May 6 10:18:00 2022 GMT + Not After : May 6 10:15:00 2042 GMT + Subject: 1.3.6.1.4.1.37244.1.1 = 0000000033334444, 1.3.6.1.4.1.37244.1.5 = FABFAB000000000A + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:dc:86:df:41:fd:7f:64:7b:06:f4:c1:af:96:97: + e8:51:85:5b:33:6a:eb:04:2b:38:f0:2b:ec:46:19: + 1a:92:7a:e8:56:ec:b3:1e:94:81:2e:88:f0:c3:ff: + 25:a0:05:fd:cf:65:f7:c2:45:bd:5d:dc:c0:a7:6d: + 32:ac:c0:f0:e2 + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:FALSE + X509v3 Subject Key Identifier: + FF:09:BF:22:A9:30:C3:52:EE:28:43:A6:9B:E3:E1:8A:8F:08:6E:05 + X509v3 Authority Key Identifier: + keyid:0F:84:4C:F6:84:73:3D:EC:6C:8B:EB:28:95:4B:BE:1B:89:D3:A7:6C + + X509v3 Key Usage: critical + Digital Signature + X509v3 Extended Key Usage: critical + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: ecdsa-with-SHA256 + 30:45:02:20:43:7b:f2:17:aa:67:77:23:22:b8:7e:cb:9e:94: + 34:d1:e3:0e:0d:ca:26:09:7e:27:9e:ff:49:70:11:e3:81:7f: + 02:21:00:fe:6b:2c:1b:7c:51:fa:f4:d8:7f:2d:f4:14:35:4d: + 4b:e1:81:0f:f0:58:6d:36:d6:44:63:ba:4d:1b:ad:94:55 diff --git a/src/credentials/tests/certificates/UnitTest_NodeA3.pem b/src/credentials/tests/certificates/UnitTest_NodeA3.pem new file mode 100644 index 00000000000000..f4bfa4c095b443 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA3.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIK4FdXuI64c7YGiFYKT4i9Ecg6e5FjQKwrH4b5/ZgT+CoAoGCCqGSM49 +AwEHoUQDQgAE3IbfQf1/ZHsG9MGvlpfoUYVbM2rrBCs48CvsRhkaknroVuyzHpSB +Lojww/8loAX9z2X3wkW9XdzAp20yrMDw4g== +-----END EC PRIVATE KEY----- diff --git a/src/credentials/tests/certificates/UnitTest_NodeA3.pem.txt b/src/credentials/tests/certificates/UnitTest_NodeA3.pem.txt new file mode 100644 index 00000000000000..18b969733b7a24 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA3.pem.txt @@ -0,0 +1,13 @@ +Private-Key: (256 bit) +priv: + ae:05:75:7b:88:eb:87:3b:60:68:85:60:a4:f8:8b: + d1:1c:83:a7:b9:16:34:0a:c2:b1:f8:6f:9f:d9:81: + 3f:82 +pub: + 04:dc:86:df:41:fd:7f:64:7b:06:f4:c1:af:96:97: + e8:51:85:5b:33:6a:eb:04:2b:38:f0:2b:ec:46:19: + 1a:92:7a:e8:56:ec:b3:1e:94:81:2e:88:f0:c3:ff: + 25:a0:05:fd:cf:65:f7:c2:45:bd:5d:dc:c0:a7:6d: + 32:ac:c0:f0:e2 +ASN1 OID: prime256v1 +NIST CURVE: P-256 diff --git a/src/credentials/tests/certificates/UnitTest_NodeA4.crt b/src/credentials/tests/certificates/UnitTest_NodeA4.crt new file mode 100644 index 00000000000000..c3f59d184d8061 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA4.crt @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIICAjCCAaigAwIBAgIIZKkh937NjF4wCgYIKoZIzj0EAwIwRDEgMB4GCisGAQQB +gqJ8AQQMEENBQ0FDQUNBMDAwMDAwMEExIDAeBgorBgEEAYKifAEFDBBGQUJGQUIw +MDAwMDAwMDBBMB4XDTIyMDUwNjEwNTMwMFoXDTQyMDUwNjEwMTUwMFowRDEgMB4G +CisGAQQBgqJ8AQEMEDAwMDAwMDAwNDQ0NDMzMzMxIDAeBgorBgEEAYKifAEFDBBG +QUJGQUIwMDAwMDAwMDBBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE42Sg8bAA +/bELEA3T06aJELYBoc/nXaI7cMigBuK7Dm40Np7OojDAVaj6a4OfeUGCv0qFr3QP +x9RWp90+yMqAK6OBgzCBgDAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBTh6r3dc7dQ +B6qAMtp0yshosSjekDAfBgNVHSMEGDAWgBQF9IE7B/yyblbIVjw7EZcf9tGtHzAO +BgNVHQ8BAf8EBAMCB4AwIAYDVR0lAQH/BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC +MAoGCCqGSM49BAMCA0gAMEUCIQDFFGyaQJdZFwGhrjEaSn+mpdNlEevOEZNPy7uc +xgZsfQIgUGeZwzDgGW+oNtfeDTZM6vgdlOtK+/vVAUaBuLewsac= +-----END CERTIFICATE----- diff --git a/src/credentials/tests/certificates/UnitTest_NodeA4.crt.txt b/src/credentials/tests/certificates/UnitTest_NodeA4.crt.txt new file mode 100644 index 00000000000000..a8bbaa0ac33317 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA4.crt.txt @@ -0,0 +1,38 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 7253366021724933214 (0x64a921f77ecd8c5e) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: 1.3.6.1.4.1.37244.1.4 = CACACACA0000000A, 1.3.6.1.4.1.37244.1.5 = FABFAB000000000A + Validity + Not Before: May 6 10:53:00 2022 GMT + Not After : May 6 10:15:00 2042 GMT + Subject: 1.3.6.1.4.1.37244.1.1 = 0000000044443333, 1.3.6.1.4.1.37244.1.5 = FABFAB000000000A + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:e3:64:a0:f1:b0:00:fd:b1:0b:10:0d:d3:d3:a6: + 89:10:b6:01:a1:cf:e7:5d:a2:3b:70:c8:a0:06:e2: + bb:0e:6e:34:36:9e:ce:a2:30:c0:55:a8:fa:6b:83: + 9f:79:41:82:bf:4a:85:af:74:0f:c7:d4:56:a7:dd: + 3e:c8:ca:80:2b + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:FALSE + X509v3 Subject Key Identifier: + E1:EA:BD:DD:73:B7:50:07:AA:80:32:DA:74:CA:C8:68:B1:28:DE:90 + X509v3 Authority Key Identifier: + keyid:05:F4:81:3B:07:FC:B2:6E:56:C8:56:3C:3B:11:97:1F:F6:D1:AD:1F + + X509v3 Key Usage: critical + Digital Signature + X509v3 Extended Key Usage: critical + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: ecdsa-with-SHA256 + 30:45:02:21:00:c5:14:6c:9a:40:97:59:17:01:a1:ae:31:1a: + 4a:7f:a6:a5:d3:65:11:eb:ce:11:93:4f:cb:bb:9c:c6:06:6c: + 7d:02:20:50:67:99:c3:30:e0:19:6f:a8:36:d7:de:0d:36:4c: + ea:f8:1d:94:eb:4a:fb:fb:d5:01:46:81:b8:b7:b0:b1:a7 diff --git a/src/credentials/tests/certificates/UnitTest_NodeA4.pem b/src/credentials/tests/certificates/UnitTest_NodeA4.pem new file mode 100644 index 00000000000000..d996e3ba197fa4 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA4.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEINkhPHWtE8P1uJHtAkFz0HeT3KtBoiaNlNkM5WUI6vvfoAoGCCqGSM49 +AwEHoUQDQgAE42Sg8bAA/bELEA3T06aJELYBoc/nXaI7cMigBuK7Dm40Np7OojDA +Vaj6a4OfeUGCv0qFr3QPx9RWp90+yMqAKw== +-----END EC PRIVATE KEY----- diff --git a/src/credentials/tests/certificates/UnitTest_NodeA4.pem.txt b/src/credentials/tests/certificates/UnitTest_NodeA4.pem.txt new file mode 100644 index 00000000000000..aac4e08c28ae97 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeA4.pem.txt @@ -0,0 +1,13 @@ +Private-Key: (256 bit) +priv: + d9:21:3c:75:ad:13:c3:f5:b8:91:ed:02:41:73:d0: + 77:93:dc:ab:41:a2:26:8d:94:d9:0c:e5:65:08:ea: + fb:df +pub: + 04:e3:64:a0:f1:b0:00:fd:b1:0b:10:0d:d3:d3:a6: + 89:10:b6:01:a1:cf:e7:5d:a2:3b:70:c8:a0:06:e2: + bb:0e:6e:34:36:9e:ce:a2:30:c0:55:a8:fa:6b:83: + 9f:79:41:82:bf:4a:85:af:74:0f:c7:d4:56:a7:dd: + 3e:c8:ca:80:2b +ASN1 OID: prime256v1 +NIST CURVE: P-256 diff --git a/src/credentials/tests/certificates/UnitTest_NodeB1.crt b/src/credentials/tests/certificates/UnitTest_NodeB1.crt new file mode 100644 index 00000000000000..1f25d824643333 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeB1.crt @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB3zCCAYagAwIBAgIIDPqa1p54vXYwCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB +gqJ8AQMMEDBBMEEwQTBBMDAwMDAwQjEwHhcNMjIwNTA2MTA1MzAwWhcNNDIwNTA2 +MTAwMDAwWjBEMSAwHgYKKwYBBAGConwBAQwQMDAwMDAwMDAxMTIyMzM0NDEgMB4G +CisGAQQBgqJ8AQUMEEZBQkZBQjAwMDAwMDAwMEIwWTATBgcqhkjOPQIBBggqhkjO +PQMBBwNCAATZ0Vx0oJwS/70gVOm65dqvXrgOydmWhvrcs77kQqEZeqG/CMSQYv+A +bLjR87pN1uXka6s8nSc5c/X4r0wnDPjYo4GDMIGAMAwGA1UdEwEB/wQCMAAwHQYD +VR0OBBYEFPblgnQaPJlQLCpDb/R8Kw+r5ArNMB8GA1UdIwQYMBaAFAlDFxCWc2oL +yM4nNC5DJLHKmM9aMA4GA1UdDwEB/wQEAwIHgDAgBgNVHSUBAf8EFjAUBggrBgEF +BQcDAQYIKwYBBQUHAwIwCgYIKoZIzj0EAwIDRwAwRAIgRg/5mqoILBBi7LB5gO8w +1oFJtjQArDROzzQViUJ3D8QCIE3AFWxopkQQp0vvFwJaSCpCg3U8N0kowpUoyY7y +qNJq +-----END CERTIFICATE----- diff --git a/src/credentials/tests/certificates/UnitTest_NodeB1.crt.txt b/src/credentials/tests/certificates/UnitTest_NodeB1.crt.txt new file mode 100644 index 00000000000000..d802b8a8e2f6c6 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeB1.crt.txt @@ -0,0 +1,38 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 935230119205191030 (0xcfa9ad69e78bd76) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: 1.3.6.1.4.1.37244.1.3 = 0A0A0A0A000000B1 + Validity + Not Before: May 6 10:53:00 2022 GMT + Not After : May 6 10:00:00 2042 GMT + Subject: 1.3.6.1.4.1.37244.1.1 = 0000000011223344, 1.3.6.1.4.1.37244.1.5 = FABFAB000000000B + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:d9:d1:5c:74:a0:9c:12:ff:bd:20:54:e9:ba:e5: + da:af:5e:b8:0e:c9:d9:96:86:fa:dc:b3:be:e4:42: + a1:19:7a:a1:bf:08:c4:90:62:ff:80:6c:b8:d1:f3: + ba:4d:d6:e5:e4:6b:ab:3c:9d:27:39:73:f5:f8:af: + 4c:27:0c:f8:d8 + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:FALSE + X509v3 Subject Key Identifier: + F6:E5:82:74:1A:3C:99:50:2C:2A:43:6F:F4:7C:2B:0F:AB:E4:0A:CD + X509v3 Authority Key Identifier: + keyid:09:43:17:10:96:73:6A:0B:C8:CE:27:34:2E:43:24:B1:CA:98:CF:5A + + X509v3 Key Usage: critical + Digital Signature + X509v3 Extended Key Usage: critical + TLS Web Server Authentication, TLS Web Client Authentication + Signature Algorithm: ecdsa-with-SHA256 + 30:44:02:20:46:0f:f9:9a:aa:08:2c:10:62:ec:b0:79:80:ef: + 30:d6:81:49:b6:34:00:ac:34:4e:cf:34:15:89:42:77:0f:c4: + 02:20:4d:c0:15:6c:68:a6:44:10:a7:4b:ef:17:02:5a:48:2a: + 42:83:75:3c:37:49:28:c2:95:28:c9:8e:f2:a8:d2:6a diff --git a/src/credentials/tests/certificates/UnitTest_NodeB1.pem b/src/credentials/tests/certificates/UnitTest_NodeB1.pem new file mode 100644 index 00000000000000..f512ec0ef0e2be --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeB1.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIMn6GC5itdANvXlQlB9J+2f9dB+hO2WyrEfYXm8MVvtJoAoGCCqGSM49 +AwEHoUQDQgAE2dFcdKCcEv+9IFTpuuXar164DsnZlob63LO+5EKhGXqhvwjEkGL/ +gGy40fO6Tdbl5GurPJ0nOXP1+K9MJwz42A== +-----END EC PRIVATE KEY----- diff --git a/src/credentials/tests/certificates/UnitTest_NodeB1.pem.txt b/src/credentials/tests/certificates/UnitTest_NodeB1.pem.txt new file mode 100644 index 00000000000000..bada4b8980f2de --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_NodeB1.pem.txt @@ -0,0 +1,13 @@ +Private-Key: (256 bit) +priv: + c9:fa:18:2e:62:b5:d0:0d:bd:79:50:94:1f:49:fb: + 67:fd:74:1f:a1:3b:65:b2:ac:47:d8:5e:6f:0c:56: + fb:49 +pub: + 04:d9:d1:5c:74:a0:9c:12:ff:bd:20:54:e9:ba:e5: + da:af:5e:b8:0e:c9:d9:96:86:fa:dc:b3:be:e4:42: + a1:19:7a:a1:bf:08:c4:90:62:ff:80:6c:b8:d1:f3: + ba:4d:d6:e5:e4:6b:ab:3c:9d:27:39:73:f5:f8:af: + 4c:27:0c:f8:d8 +ASN1 OID: prime256v1 +NIST CURVE: P-256 diff --git a/src/credentials/tests/certificates/UnitTest_RootA.crt b/src/credentials/tests/certificates/UnitTest_RootA.crt new file mode 100644 index 00000000000000..658a21cfe937b6 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_RootA.crt @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIIB4TCCAYegAwIBAgIIZLU+FtFsYhAwCgYIKoZIzj0EAwIwRDEgMB4GCisGAQQB +gqJ8AQQMEENBQ0FDQUNBMDAwMDAwMEExIDAeBgorBgEEAYKifAEFDBBGQUJGQUIw +MDAwMDAwMDBBMB4XDTIyMDUwNjEwNTMwMFoXDTQyMDUwNjEwNTMwMFowRDEgMB4G +CisGAQQBgqJ8AQQMEENBQ0FDQUNBMDAwMDAwMEExIDAeBgorBgEEAYKifAEFDBBG +QUJGQUIwMDAwMDAwMDBBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEW92WWANf +bCZp6SfwwaugedMjRIPBgjl4SxoNBX9iznKMrjuf70kY8OjoO26YcYF5t49mOkkP +fDIOXYt8dlVqLqNjMGEwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUBfSBOwf8 +sm5WyFY8OxGXH/bRrR8wHwYDVR0jBBgwFoAUBfSBOwf8sm5WyFY8OxGXH/bRrR8w +DgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMCA0gAMEUCIQDkGPT3VFudoePdn7Rw +GkfaykGAVvxq4XECofzG0oICVwIgbf1Lp+scHTiK+25N7TMf85H3+yu2WYVrS0Ib +NZsV6MA= +-----END CERTIFICATE----- diff --git a/src/credentials/tests/certificates/UnitTest_RootA.crt.txt b/src/credentials/tests/certificates/UnitTest_RootA.crt.txt new file mode 100644 index 00000000000000..e15557793f6a82 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_RootA.crt.txt @@ -0,0 +1,36 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 7256774642301166096 (0x64b53e16d16c6210) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: 1.3.6.1.4.1.37244.1.4 = CACACACA0000000A, 1.3.6.1.4.1.37244.1.5 = FABFAB000000000A + Validity + Not Before: May 6 10:53:00 2022 GMT + Not After : May 6 10:53:00 2042 GMT + Subject: 1.3.6.1.4.1.37244.1.4 = CACACACA0000000A, 1.3.6.1.4.1.37244.1.5 = FABFAB000000000A + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:5b:dd:96:58:03:5f:6c:26:69:e9:27:f0:c1:ab: + a0:79:d3:23:44:83:c1:82:39:78:4b:1a:0d:05:7f: + 62:ce:72:8c:ae:3b:9f:ef:49:18:f0:e8:e8:3b:6e: + 98:71:81:79:b7:8f:66:3a:49:0f:7c:32:0e:5d:8b: + 7c:76:55:6a:2e + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + 05:F4:81:3B:07:FC:B2:6E:56:C8:56:3C:3B:11:97:1F:F6:D1:AD:1F + X509v3 Authority Key Identifier: + keyid:05:F4:81:3B:07:FC:B2:6E:56:C8:56:3C:3B:11:97:1F:F6:D1:AD:1F + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA256 + 30:45:02:21:00:e4:18:f4:f7:54:5b:9d:a1:e3:dd:9f:b4:70: + 1a:47:da:ca:41:80:56:fc:6a:e1:71:02:a1:fc:c6:d2:82:02: + 57:02:20:6d:fd:4b:a7:eb:1c:1d:38:8a:fb:6e:4d:ed:33:1f: + f3:91:f7:fb:2b:b6:59:85:6b:4b:42:1b:35:9b:15:e8:c0 diff --git a/src/credentials/tests/certificates/UnitTest_RootA.pem b/src/credentials/tests/certificates/UnitTest_RootA.pem new file mode 100644 index 00000000000000..c4e29f64e621ec --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_RootA.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIIhXtfOo+sQlhgUYbLe3vx8ZBl3ZZZhlpwYN65S1e23VoAoGCCqGSM49 +AwEHoUQDQgAEW92WWANfbCZp6SfwwaugedMjRIPBgjl4SxoNBX9iznKMrjuf70kY +8OjoO26YcYF5t49mOkkPfDIOXYt8dlVqLg== +-----END EC PRIVATE KEY----- diff --git a/src/credentials/tests/certificates/UnitTest_RootA.pem.txt b/src/credentials/tests/certificates/UnitTest_RootA.pem.txt new file mode 100644 index 00000000000000..1fa24e8609a5b5 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_RootA.pem.txt @@ -0,0 +1,13 @@ +Private-Key: (256 bit) +priv: + 88:57:b5:f3:a8:fa:c4:25:86:05:18:6c:b7:b7:bf: + 1f:19:06:5d:d9:65:98:65:a7:06:0d:eb:94:b5:7b: + 6d:d5 +pub: + 04:5b:dd:96:58:03:5f:6c:26:69:e9:27:f0:c1:ab: + a0:79:d3:23:44:83:c1:82:39:78:4b:1a:0d:05:7f: + 62:ce:72:8c:ae:3b:9f:ef:49:18:f0:e8:e8:3b:6e: + 98:71:81:79:b7:8f:66:3a:49:0f:7c:32:0e:5d:8b: + 7c:76:55:6a:2e +ASN1 OID: prime256v1 +NIST CURVE: P-256 diff --git a/src/credentials/tests/certificates/UnitTest_RootB.crt b/src/credentials/tests/certificates/UnitTest_RootB.crt new file mode 100644 index 00000000000000..71ba6e06983fdd --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_RootB.crt @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE----- +MIIBnjCCAUOgAwIBAgIIHejcMX2Tjo4wCgYIKoZIzj0EAwIwIjEgMB4GCisGAQQB +gqJ8AQQMEENBQ0FDQUNBMDAwMDAwMEIwHhcNMjIwNTA2MTAwMDAwWhcNNDIwNTA2 +MTAwMDAwWjAiMSAwHgYKKwYBBAGConwBBAwQQ0FDQUNBQ0EwMDAwMDAwQjBZMBMG +ByqGSM49AgEGCCqGSM49AwEHA0IABGaQetZo7orIv56YutsVRxhOgm5aIkGWJ+hf +x0evdORHREaaY+0hX2aFLQ38IweDdIyemIDlzNl50Gcn60WzgVWjYzBhMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFLmtV5282Vo/NAcXjwQCW0ApEr2pMB8GA1Ud +IwQYMBaAFLmtV5282Vo/NAcXjwQCW0ApEr2pMA4GA1UdDwEB/wQEAwIBBjAKBggq +hkjOPQQDAgNJADBGAiEAvPB4GrrWhbyOvLNnQ8ucRYe6iemh28F5b5311nL5e0UC +IQCkpaSWOlMxcw/jJSvkikxom7xtvS4Q2jg4CONIFke0fA== +-----END CERTIFICATE----- diff --git a/src/credentials/tests/certificates/UnitTest_RootB.crt.txt b/src/credentials/tests/certificates/UnitTest_RootB.crt.txt new file mode 100644 index 00000000000000..af35a7392d9f21 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_RootB.crt.txt @@ -0,0 +1,36 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 2155214526815112846 (0x1de8dc317d938e8e) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: 1.3.6.1.4.1.37244.1.4 = CACACACA0000000B + Validity + Not Before: May 6 10:00:00 2022 GMT + Not After : May 6 10:00:00 2042 GMT + Subject: 1.3.6.1.4.1.37244.1.4 = CACACACA0000000B + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:66:90:7a:d6:68:ee:8a:c8:bf:9e:98:ba:db:15: + 47:18:4e:82:6e:5a:22:41:96:27:e8:5f:c7:47:af: + 74:e4:47:44:46:9a:63:ed:21:5f:66:85:2d:0d:fc: + 23:07:83:74:8c:9e:98:80:e5:cc:d9:79:d0:67:27: + eb:45:b3:81:55 + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE + X509v3 Subject Key Identifier: + B9:AD:57:9D:BC:D9:5A:3F:34:07:17:8F:04:02:5B:40:29:12:BD:A9 + X509v3 Authority Key Identifier: + keyid:B9:AD:57:9D:BC:D9:5A:3F:34:07:17:8F:04:02:5B:40:29:12:BD:A9 + + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + Signature Algorithm: ecdsa-with-SHA256 + 30:46:02:21:00:bc:f0:78:1a:ba:d6:85:bc:8e:bc:b3:67:43: + cb:9c:45:87:ba:89:e9:a1:db:c1:79:6f:9d:f5:d6:72:f9:7b: + 45:02:21:00:a4:a5:a4:96:3a:53:31:73:0f:e3:25:2b:e4:8a: + 4c:68:9b:bc:6d:bd:2e:10:da:38:38:08:e3:48:16:47:b4:7c diff --git a/src/credentials/tests/certificates/UnitTest_RootB.pem b/src/credentials/tests/certificates/UnitTest_RootB.pem new file mode 100644 index 00000000000000..a4391aa673aee2 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_RootB.pem @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIJPK/R+sUS+ofMWXQrsfD/rhv9RJ/byogUQBTU3tHg0NoAoGCCqGSM49 +AwEHoUQDQgAEZpB61mjuisi/npi62xVHGE6CbloiQZYn6F/HR6905EdERppj7SFf +ZoUtDfwjB4N0jJ6YgOXM2XnQZyfrRbOBVQ== +-----END EC PRIVATE KEY----- diff --git a/src/credentials/tests/certificates/UnitTest_RootB.pem.txt b/src/credentials/tests/certificates/UnitTest_RootB.pem.txt new file mode 100644 index 00000000000000..c99326e7db3e96 --- /dev/null +++ b/src/credentials/tests/certificates/UnitTest_RootB.pem.txt @@ -0,0 +1,13 @@ +Private-Key: (256 bit) +priv: + 93:ca:fd:1f:ac:51:2f:a8:7c:c5:97:42:bb:1f:0f: + fa:e1:bf:d4:49:fd:bc:a8:81:44:01:4d:4d:ed:1e: + 0d:0d +pub: + 04:66:90:7a:d6:68:ee:8a:c8:bf:9e:98:ba:db:15: + 47:18:4e:82:6e:5a:22:41:96:27:e8:5f:c7:47:af: + 74:e4:47:44:46:9a:63:ed:21:5f:66:85:2d:0d:fc: + 23:07:83:74:8c:9e:98:80:e5:cc:d9:79:d0:67:27: + eb:45:b3:81:55 +ASN1 OID: prime256v1 +NIST CURVE: P-256 diff --git a/src/credentials/tests/certificates/certs b/src/credentials/tests/certificates/certs new file mode 100644 index 00000000000000..af997aa36fe01b --- /dev/null +++ b/src/credentials/tests/certificates/certs @@ -0,0 +1,10 @@ +UnitTest_RootA.crt +UnitTest_RootB.crt +UnitTest_IA_A1.crt +UnitTest_IA_A2.crt +UnitTest_IA_B1.crt +UnitTest_NodeA1.crt +UnitTest_NodeA2.crt +UnitTest_NodeA3.crt +UnitTest_NodeA4.crt +UnitTest_NodeB1.crt diff --git a/src/credentials/tests/certificates/keys b/src/credentials/tests/certificates/keys new file mode 100644 index 00000000000000..596042de96f39d --- /dev/null +++ b/src/credentials/tests/certificates/keys @@ -0,0 +1,10 @@ +UnitTest_RootA.pem +UnitTest_RootB.pem +UnitTest_IA_A1.pem +UnitTest_IA_A2.pem +UnitTest_IA_B1.pem +UnitTest_NodeA1.pem +UnitTest_NodeA2.pem +UnitTest_NodeA3.pem +UnitTest_NodeA4.pem +UnitTest_NodeB1.pem From d85700ed4ce56ecced5b8e6a0ce8f1d8ec76dc04 Mon Sep 17 00:00:00 2001 From: Zang MingJie Date: Tue, 10 May 2022 00:38:06 +0800 Subject: [PATCH 04/26] Fix cirque docker ubuntu package (#18208) --- .../docker/ci-only-images/chip-cirque-device-base/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile b/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile index 89c56b011f4b90..a1075710f7e238 100644 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile +++ b/integrations/docker/ci-only-images/chip-cirque-device-base/Dockerfile @@ -11,8 +11,9 @@ RUN mkdir /app WORKDIR /app -# TODO: Use multi stage build for smaller image size. +RUN apt-cache policy +# TODO: Use multi stage build for smaller image size. RUN apt-get update \ && apt-get install --no-install-recommends -y \ avahi-daemon=0.7-4ubuntu7.1 \ @@ -24,7 +25,7 @@ RUN apt-get update \ iproute2=5.5.0-1ubuntu1 \ libavahi-client3=0.7-4ubuntu7.1 \ libcairo2-dev=1.16.0-4ubuntu1 \ - libdbus-1-dev=1.12.16-2ubuntu2.1 \ + libdbus-1-dev=1.12.16-2ubuntu2.2 \ libgif-dev=5.1.9-1 \ libgirepository1.0-dev=1.64.1-1~ubuntu20.04.1 \ libglib2.0-dev=2.64.6-1~ubuntu20.04.4 \ From c880e28f866c53a42c72e812a8bb13d517bb953e Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 9 May 2022 13:54:37 -0400 Subject: [PATCH 05/26] Stop having darwin tests depend on in-framework key generation. (#18178) Adds a key generator that the test files can share. --- .gitattributes | 1 - .../Framework/CHIP.xcodeproj/project.pbxproj | 4 + .../Framework/CHIPTests/CHIPClustersTests.m | 10 +- .../Framework/CHIPTests/CHIPControllerTests.m | 154 ++++++++++++++++-- .../Framework/CHIPTests/CHIPDeviceTests.m | 10 +- src/darwin/Framework/CHIPTests/CHIPTestKeys.h | 29 ++++ src/darwin/Framework/CHIPTests/CHIPTestKeys.m | 95 +++++++++++ .../CHIPTests/CHIPXPCListenerSampleTests.m | 10 +- 8 files changed, 290 insertions(+), 23 deletions(-) create mode 100644 src/darwin/Framework/CHIPTests/CHIPTestKeys.h create mode 100644 src/darwin/Framework/CHIPTests/CHIPTestKeys.m diff --git a/.gitattributes b/.gitattributes index 7bba4013a0af6f..5e24eb54b5e560 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,4 +5,3 @@ # And some specific generated files src/controller/python/chip/clusters/CHIPClusters.py linguist-generated src/controller/python/chip/clusters/Objects.py linguist-generated -src/darwin/Framework/CHIPTests/CHIPClustersTests.m linguist-generated diff --git a/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj b/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj index fb9b6a2a6d63e3..fb843ed134a389 100644 --- a/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj @@ -45,6 +45,7 @@ 51B22C222740CB1D008D5055 /* CHIPCommandPayloadsObjc.h in Headers */ = {isa = PBXBuildFile; fileRef = 51B22C212740CB1D008D5055 /* CHIPCommandPayloadsObjc.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51B22C262740CB32008D5055 /* CHIPStructsObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B22C252740CB32008D5055 /* CHIPStructsObjc.mm */; }; 51B22C2A2740CB47008D5055 /* CHIPCommandPayloadsObjc.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51B22C292740CB47008D5055 /* CHIPCommandPayloadsObjc.mm */; }; + 51C8E3F82825CDB600D47D00 /* CHIPTestKeys.m in Sources */ = {isa = PBXBuildFile; fileRef = 51C8E3F72825CDB600D47D00 /* CHIPTestKeys.m */; }; 51D10D2E2808E2CA00E8CA3D /* CHIPTestStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 51D10D2D2808E2CA00E8CA3D /* CHIPTestStorage.m */; }; 51E0310027EA20D20083DC9C /* CHIPControllerAccessControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E030FE27EA20D20083DC9C /* CHIPControllerAccessControl.h */; }; 51E0310127EA20D20083DC9C /* CHIPControllerAccessControl.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51E030FF27EA20D20083DC9C /* CHIPControllerAccessControl.mm */; }; @@ -148,6 +149,7 @@ 51B22C212740CB1D008D5055 /* CHIPCommandPayloadsObjc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CHIPCommandPayloadsObjc.h; path = "zap-generated/CHIPCommandPayloadsObjc.h"; sourceTree = ""; }; 51B22C252740CB32008D5055 /* CHIPStructsObjc.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CHIPStructsObjc.mm; path = "zap-generated/CHIPStructsObjc.mm"; sourceTree = ""; }; 51B22C292740CB47008D5055 /* CHIPCommandPayloadsObjc.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CHIPCommandPayloadsObjc.mm; path = "zap-generated/CHIPCommandPayloadsObjc.mm"; sourceTree = ""; }; + 51C8E3F72825CDB600D47D00 /* CHIPTestKeys.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHIPTestKeys.m; sourceTree = ""; }; 51D10D2D2808E2CA00E8CA3D /* CHIPTestStorage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CHIPTestStorage.m; sourceTree = ""; }; 51E030FE27EA20D20083DC9C /* CHIPControllerAccessControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHIPControllerAccessControl.h; sourceTree = ""; }; 51E030FF27EA20D20083DC9C /* CHIPControllerAccessControl.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CHIPControllerAccessControl.mm; sourceTree = ""; }; @@ -353,6 +355,7 @@ isa = PBXGroup; children = ( 51E24E72274E0DAC007CCF6E /* CHIPErrorTestUtils.mm */, + 51C8E3F72825CDB600D47D00 /* CHIPTestKeys.m */, 51D10D2D2808E2CA00E8CA3D /* CHIPTestStorage.m */, 1EB41B7A263C4CC60048E4C1 /* CHIPClustersTests.m */, 99C65E0F267282F1003402F6 /* CHIPControllerTests.m */, @@ -593,6 +596,7 @@ 51D10D2E2808E2CA00E8CA3D /* CHIPTestStorage.m in Sources */, 1EB41B7B263C4CC60048E4C1 /* CHIPClustersTests.m in Sources */, 997DED1A26955D0200975E97 /* CHIPThreadOperationalDatasetTests.mm in Sources */, + 51C8E3F82825CDB600D47D00 /* CHIPTestKeys.m in Sources */, 99C65E10267282F1003402F6 /* CHIPControllerTests.m in Sources */, 5A6FEC9D27B5E48900F25F42 /* CHIPXPCProtocolTests.m in Sources */, 5AE6D4E427A99041001F2493 /* CHIPDeviceTests.m in Sources */, diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 99f1f6e9d25ee4..fc1e6420300802 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -24,6 +24,7 @@ #import #import "CHIPErrorTestUtils.h" +#import "CHIPTestKeys.h" #import "CHIPTestStorage.h" #import @@ -121,12 +122,15 @@ - (void)testInitStack BOOL ok = [factory startup:factoryParams]; XCTAssertTrue(ok); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; params.vendorId = kTestVendorId; params.fabricId = 1; + params.ipk = testKeys.ipk; - // TODO: Once we have a non-nil keypair, use startControllerOnNewFabric. - CHIPDeviceController * controller = [factory startControllerOnExistingFabric:params]; + CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); sController = controller; diff --git a/src/darwin/Framework/CHIPTests/CHIPControllerTests.m b/src/darwin/Framework/CHIPTests/CHIPControllerTests.m index 6e45798b0f359e..2489ee9a9f327e 100644 --- a/src/darwin/Framework/CHIPTests/CHIPControllerTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPControllerTests.m @@ -23,6 +23,7 @@ // system dependencies #import +#import "CHIPTestKeys.h" #import "CHIPTestStorage.h" static uint16_t kTestVendorId = 0xFFF1u; @@ -65,12 +66,15 @@ - (void)testControllerLifecycle XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; params.vendorId = kTestVendorId; params.fabricId = 1; + params.ipk = testKeys.ipk; - // TODO: Once we have a non-nil keypair, use startControllerOnNewFabric. - CHIPDeviceController * controller = [factory startControllerOnExistingFabric:params]; + CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -99,12 +103,15 @@ - (void)testFactoryShutdownShutsDownController XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; params.vendorId = kTestVendorId; params.fabricId = 1; + params.ipk = testKeys.ipk; - // TODO: Once we have a non-nil keypair, use startControllerOnNewFabric. - CHIPDeviceController * controller = [factory startControllerOnExistingFabric:params]; + CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); @@ -123,12 +130,15 @@ - (void)testControllerMultipleShutdown XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; params.vendorId = kTestVendorId; params.fabricId = 1; + params.ipk = testKeys.ipk; - // TODO: Once we have a non-nil keypair, use startControllerOnNewFabric. - CHIPDeviceController * controller = [factory startControllerOnExistingFabric:params]; + CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertTrue([controller isRunning]); for (int i = 0; i < 5; i++) { [controller shutdown]; @@ -149,12 +159,15 @@ - (void)testControllerInvalidAccess XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; params.vendorId = kTestVendorId; params.fabricId = 1; + params.ipk = testKeys.ipk; - // TODO: Once we have a non-nil keypair, use startControllerOnNewFabric. - CHIPDeviceController * controller = [factory startControllerOnExistingFabric:params]; + CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertTrue([controller isRunning]); [controller shutdown]; @@ -179,11 +192,15 @@ - (void)testControllerStartTwoControllersNoKeypair XCTAssertTrue([factory startup:factoryParams]); XCTAssertTrue([factory isRunning]); + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; params.vendorId = kTestVendorId; params.fabricId = 1; - // TODO: Once we have a non-nil keypair, use startControllerOnNewFabric. + // TODO: Once we require a non-nil keypair, this test will stop + // making sense and need to go away. CHIPDeviceController * controller1 = [factory startControllerOnExistingFabric:params]; XCTAssertNotNil(controller1); XCTAssertTrue([controller1 isRunning]); @@ -204,4 +221,115 @@ - (void)testControllerStartTwoControllersNoKeypair XCTAssertFalse([factory isRunning]); } +- (void)testControllerNewFabricMatchesOldFabric +{ + __auto_type * factory = [MatterControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * storage = [[CHIPTestStorage alloc] init]; + __auto_type * factoryParams = [[MatterControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); + XCTAssertTrue([factory isRunning]); + + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + params.vendorId = kTestVendorId; + params.fabricId = 1; + params.ipk = testKeys.ipk; + + CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); + + // now try to start a new controller on a new fabric but using the + // same params; this should fail. + XCTAssertNil([factory startControllerOnNewFabric:params]); + + XCTAssertFalse([controller isRunning]); + + [factory shutdown]; + XCTAssertFalse([factory isRunning]); +} + +- (void)testControllerExistingFabricMatchesRunningController +{ + __auto_type * factory = [MatterControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * storage = [[CHIPTestStorage alloc] init]; + __auto_type * factoryParams = [[MatterControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); + XCTAssertTrue([factory isRunning]); + + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + params.vendorId = kTestVendorId; + params.fabricId = 1; + params.ipk = testKeys.ipk; + + CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; + XCTAssertNotNil(controller); + XCTAssertTrue([controller isRunning]); + + // Now try to start a new controller on the same fabric. This should fail. + XCTAssertNil([factory startControllerOnExistingFabric:params]); + + XCTAssertTrue([controller isRunning]); + + [controller shutdown]; + XCTAssertFalse([controller isRunning]); + + [factory shutdown]; + XCTAssertFalse([factory isRunning]); +} + +- (void)testControllerStartControllersOnTwoFabricIds +{ + __auto_type * factory = [MatterControllerFactory sharedInstance]; + XCTAssertNotNil(factory); + + __auto_type * storage = [[CHIPTestStorage alloc] init]; + __auto_type * factoryParams = [[MatterControllerFactoryParams alloc] initWithStorage:storage]; + XCTAssertTrue([factory startup:factoryParams]); + XCTAssertTrue([factory isRunning]); + + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + params.vendorId = kTestVendorId; + params.fabricId = 1; + params.ipk = testKeys.ipk; + + CHIPDeviceController * controller1 = [factory startControllerOnNewFabric:params]; + XCTAssertNotNil(controller1); + XCTAssertTrue([controller1 isRunning]); + + // Now try to start a new controller with the same root but a + // different fabric id. + params.fabricId = 2; + + CHIPDeviceController * controller2 = [factory startControllerOnNewFabric:params]; + XCTAssertNotNil(controller2); + XCTAssertTrue([controller2 isRunning]); + + XCTAssertNil([factory startControllerOnExistingFabric:params]); + + [controller1 shutdown]; + XCTAssertFalse([controller1 isRunning]); + + [controller2 shutdown]; + XCTAssertFalse([controller2 isRunning]); + + [factory shutdown]; + XCTAssertFalse([factory isRunning]); +} + @end diff --git a/src/darwin/Framework/CHIPTests/CHIPDeviceTests.m b/src/darwin/Framework/CHIPTests/CHIPDeviceTests.m index 93cd6029baf2f8..8087e497b7555f 100644 --- a/src/darwin/Framework/CHIPTests/CHIPDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPDeviceTests.m @@ -25,6 +25,7 @@ #import #import "CHIPErrorTestUtils.h" +#import "CHIPTestKeys.h" #import "CHIPTestStorage.h" #import @@ -153,12 +154,15 @@ - (void)initStack BOOL ok = [factory startup:factoryParams]; XCTAssertTrue(ok); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; params.vendorId = kTestVendorId; params.fabricId = 1; + params.ipk = testKeys.ipk; - // TODO: Once we have a non-nil keypair, use startControllerOnNewFabric. - CHIPDeviceController * controller = [factory startControllerOnExistingFabric:params]; + CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); sController = controller; diff --git a/src/darwin/Framework/CHIPTests/CHIPTestKeys.h b/src/darwin/Framework/CHIPTests/CHIPTestKeys.h new file mode 100644 index 00000000000000..c15bafe2095cb7 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/CHIPTestKeys.h @@ -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 +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface CHIPTestKeys : NSObject + +@property (readonly, nonatomic, strong) NSData * ipk; + +- (instancetype)init; +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIPTests/CHIPTestKeys.m b/src/darwin/Framework/CHIPTests/CHIPTestKeys.m new file mode 100644 index 00000000000000..7a98d1252f6043 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/CHIPTestKeys.m @@ -0,0 +1,95 @@ +/** + * 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 "CHIPTestKeys.h" +#import + +@interface CHIPTestKeys () +@property (readonly) SecKeyRef privateKey; +@property (readonly) SecKeyRef publicKey; +@end + +@implementation CHIPTestKeys + +- (instancetype)init +{ + if (!(self = [super init])) { + return nil; + } + + // Generate an IPK. For now, hardcoded to 16 bytes until the + // framework exposes this constant. + const size_t ipk_size = 16; + NSMutableData * ipkData = [NSMutableData dataWithLength:ipk_size]; + if (ipkData == nil) { + return nil; + } + + int status = SecRandomCopyBytes(kSecRandomDefault, ipk_size, [ipkData mutableBytes]); + if (status != errSecSuccess) { + NSLog(@"Failed to generate IPK"); + return nil; + } + _ipk = ipkData; + + // Generate a keypair. For now harcoded to 256 bits until the framework exposes this constant. + const size_t keySizeInBits = 256; + CFErrorRef error = NULL; + const NSDictionary * keygenParams = @{ + (__bridge NSString *) kSecAttrKeyClass : (__bridge NSString *) kSecAttrKeyClassPrivate, + (__bridge NSString *) kSecAttrKeyType : (__bridge NSNumber *) kSecAttrKeyTypeECSECPrimeRandom, + (__bridge NSString *) kSecAttrKeySizeInBits : @(keySizeInBits), + (__bridge NSString *) kSecAttrIsPermanent : @(NO) + }; + + _privateKey = SecKeyCreateRandomKey((__bridge CFDictionaryRef) keygenParams, &error); + if (error) { + NSLog(@"Failed to generate private key"); + return nil; + } + _publicKey = SecKeyCopyPublicKey(_privateKey); + + return self; +} + +- (NSData *)ECDSA_sign_hash:(NSData *)hash +{ + CFErrorRef error = NULL; + CFDataRef outData + = SecKeyCreateSignature(_privateKey, kSecKeyAlgorithmECDSASignatureRFC4754, (__bridge CFDataRef) hash, &error); + + if (error != noErr) { + NSLog(@"Failed to sign cert: %@", (__bridge NSError *) error); + } + return (__bridge_transfer NSData *) outData; +} + +- (SecKeyRef)pubkey +{ + return self.publicKey; +} + +- (void)dealloc +{ + if (_publicKey) { + CFRelease(_publicKey); + } + + if (_privateKey) { + CFRelease(_privateKey); + } +} +@end diff --git a/src/darwin/Framework/CHIPTests/CHIPXPCListenerSampleTests.m b/src/darwin/Framework/CHIPTests/CHIPXPCListenerSampleTests.m index ff5db02826db2a..33c9c5fce65a2e 100644 --- a/src/darwin/Framework/CHIPTests/CHIPXPCListenerSampleTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPXPCListenerSampleTests.m @@ -23,6 +23,7 @@ #import #import "CHIPErrorTestUtils.h" +#import "CHIPTestKeys.h" #import "CHIPTestStorage.h" #import @@ -520,12 +521,15 @@ - (void)initStack BOOL ok = [factory startup:factoryParams]; XCTAssertTrue(ok); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; + __auto_type * testKeys = [[CHIPTestKeys alloc] init]; + XCTAssertNotNil(testKeys); + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; params.vendorId = kTestVendorId; params.fabricId = 1; + params.ipk = testKeys.ipk; - // TODO: Once we have a non-nil keypair, use startControllerOnNewFabric. - CHIPDeviceController * controller = [factory startControllerOnExistingFabric:params]; + CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); sController = controller; From b1a0c94e55890443ace825f715673c5b6528f56b Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Mon, 9 May 2022 21:00:58 +0200 Subject: [PATCH 06/26] [chip-tool-darwin] AddressSanitizer: heap-use-after-free in printf_common (#18202) --- .../commands/common/CHIPCommandBridge.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.h b/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.h index a64ece326d28c7..c30650a005a26f 100644 --- a/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.h +++ b/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.h @@ -39,7 +39,15 @@ class CHIPCommandBridge : public Command void SetCommandExitStatus(CHIP_ERROR status) { +#if CHIP_CONFIG_ERROR_SOURCE + // If there is a filename in the status makes a copy of the filename as the pointer may be released + // when the autorelease pool is drained. + strncpy(mCommandExitStatusFilename, status.GetFile(), sizeof(mCommandExitStatusFilename)); + mCommandExitStatusFilename[sizeof(mCommandExitStatusFilename) - 1] = '\0'; + mCommandExitStatus = chip::ChipError(status.AsInteger(), mCommandExitStatusFilename, status.GetLine()); +#else mCommandExitStatus = status; +#endif // CHIP_CONFIG_ERROR_SOURCE ShutdownCommissioner(); StopWaiting(); } @@ -71,6 +79,9 @@ class CHIPCommandBridge : public Command CHIP_ERROR ShutdownCommissioner(); uint16_t CurrentCommissionerIndex(); +#if CHIP_CONFIG_ERROR_SOURCE + char mCommandExitStatusFilename[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; +#endif // CHIP_CONFIG_ERROR_SOURCE CHIP_ERROR mCommandExitStatus = CHIP_ERROR_INTERNAL; CHIP_ERROR StartWaiting(chip::System::Clock::Timeout seconds); From df0eb68e0c09e40051b15791eac8f605e5cf7b7f Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Mon, 9 May 2022 21:29:55 +0200 Subject: [PATCH 07/26] [YAML] Add min commissioning timeout parameters to the start command of the SystemCommand simulated cluster (#18038) * [YAML] Fix a typo in src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js * [YAML] Generate TLV parameters for the simulated clusters * Update src/app/tests/suites/commands/delay/DelayCommands.* * Update Update src/app/tests/suites/commands/log/LogCommands.* * Update src/app/tests/suites/commands/commissioner/CommissionerCommands.* * Update src/app/tests/suites/commands/discovery/DiscoveryCommands.* * Update src/app/tests/suites/commands/system/SystemCommands.* * Update chip-tool for the API changes * Update chip-tool-darwin * Update generated content * [YAML] Add minCommissioningTimeout option to SystemCommands::Start * Add min commissioning timeout into the SystemCommands tests --- .../commands/common/CHIPCommandBridge.h | 2 + .../commands/common/CHIPCommandBridge.mm | 2 + .../commands/tests/TestCommandBridge.h | 61 +- .../tests/partials/test_cluster.zapt | 17 +- .../templates/tests/templates.json | 5 + examples/chip-tool/BUILD.gn | 1 + .../chip-tool/commands/common/CHIPCommand.cpp | 6 + .../chip-tool/commands/common/CHIPCommand.h | 2 + .../chip-tool/commands/tests/TestCommand.cpp | 15 +- .../chip-tool/commands/tests/TestCommand.h | 10 +- .../tests/partials/command_value.zapt | 43 +- .../templates/tests/partials/test_step.zapt | 21 +- .../placeholder/linux/include/TestCommand.h | 3 +- scripts/tools/zap_regen_all.py | 1 + src/app/tests/suites/TestSystemCommands.yaml | 12 +- .../commissioner/CommissionerCommands.cpp | 31 +- .../commissioner/CommissionerCommands.h | 12 +- .../suites/commands/delay/DelayCommands.cpp | 11 +- .../suites/commands/delay/DelayCommands.h | 23 +- .../tests/suites/commands/discovery/BUILD.gn | 2 + .../commands/discovery/DiscoveryCommands.cpp | 150 +- .../commands/discovery/DiscoveryCommands.h | 73 +- .../tests/suites/commands/log/LogCommands.cpp | 28 +- .../tests/suites/commands/log/LogCommands.h | 6 +- .../suites/commands/system/SystemCommands.cpp | 121 +- .../suites/commands/system/SystemCommands.h | 14 +- .../templates/simulated-cluster-objects.zapt | 132 + src/app/tests/suites/templates/templates.json | 8 +- .../common/ClusterTestGeneration.js | 153 +- .../simulated-clusters/SimulatedClusters.js | 27 +- .../clusters/CommissionerCommands.js | 3 - .../clusters/DelayCommands.js | 8 - .../clusters/DiscoveryCommands.js | 16 +- .../clusters/LogCommands.js | 2 - .../clusters/SystemCommands.js | 8 +- .../zap-generated/tests/CHIPClustersTest.h | 476 + .../tests/simulated-cluster-objects.h | 1223 ++ .../zap-generated/test/Commands.h | 10473 +++++++--------- .../chip-tool/zap-generated/test/Commands.h | 3392 +++-- .../tests/simulated-cluster-objects.h | 1223 ++ .../app1/zap-generated/test/Commands.h | 18 +- .../app2/zap-generated/test/Commands.h | 18 +- 42 files changed, 9939 insertions(+), 7913 deletions(-) create mode 100644 src/app/tests/suites/templates/simulated-cluster-objects.zapt create mode 100644 zzz_generated/app-common/app-common/zap-generated/tests/CHIPClustersTest.h create mode 100644 zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h create mode 100644 zzz_generated/controller-clusters/zap-generated/tests/simulated-cluster-objects.h diff --git a/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.h b/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.h index c30650a005a26f..f8d25f790048c3 100644 --- a/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.h +++ b/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.h @@ -73,6 +73,8 @@ class CHIPCommandBridge : public Command // This method returns the commissioner instance to be used for running the command. CHIPDeviceController * CurrentCommissioner(); + CHIPDeviceController * GetCommissioner(const char * identity); + private: CHIP_ERROR InitializeCommissioner(std::string key, chip::FabricId fabricId, const chip::Credentials::AttestationTrustStore * trustStore); diff --git a/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm b/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm index 27e90dc302f349..22fa5258219d21 100644 --- a/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm +++ b/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm @@ -97,6 +97,8 @@ CHIPDeviceController * CHIPCommandBridge::CurrentCommissioner() { return mCurrentController; } +CHIPDeviceController * CHIPCommandBridge::GetCommissioner(const char * identity) { return mControllers[identity]; } + CHIP_ERROR CHIPCommandBridge::ShutdownCommissioner() { ChipLogProgress(chipTool, "Shutting down controller"); diff --git a/examples/chip-tool-darwin/commands/tests/TestCommandBridge.h b/examples/chip-tool-darwin/commands/tests/TestCommandBridge.h index f84e243c887c32..528f0cb68c1448 100644 --- a/examples/chip-tool-darwin/commands/tests/TestCommandBridge.h +++ b/examples/chip-tool-darwin/commands/tests/TestCommandBridge.h @@ -98,62 +98,80 @@ class TestCommandBridge : public CHIPCommandBridge, SetCommandExitStatus(err); } - void Log(NSString * _Nonnull message) + void Log(const char * _Nullable identity, const chip::app::Clusters::LogCommands::Commands::Log::Type & value) { - NSLog(@"%@", message); + NSLog(@"%.*s", static_cast(value.message.size()), value.message.data()); NextTest(); } /////////// DelayCommands-like Interface ///////// void WaitForMs(unsigned int ms) { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, ms * NSEC_PER_MSEC), mCallbackQueue, ^{ + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = ms; + WaitForMs(nil, value); + } + + void WaitForMs(const char * _Nullable identity, const chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type & value) + { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, value.ms * NSEC_PER_MSEC), mCallbackQueue, ^{ NextTest(); }); } - void UserPrompt(NSString * _Nonnull message, NSString * _Nullable expectedValue = nil) { NextTest(); } + void UserPrompt(const char * _Nullable identity, const chip::app::Clusters::LogCommands::Commands::UserPrompt::Type & value) + { + NextTest(); + } - void WaitForCommissionee(chip::NodeId nodeId) + void WaitForCommissionee( + const char * _Nullable identity, const chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type & value) { - CHIPDeviceController * controller = CurrentCommissioner(); + CHIPDeviceController * controller = GetCommissioner(identity); VerifyOrReturn(controller != nil, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + SetIdentity(identity); + // Disconnect our existing device; otherwise getConnectedDevice will // just hand it right back to us without establishing a new CASE // session. - if (GetConnectedDevice() != nil) { - auto device = [GetConnectedDevice() internalDevice]; + if (GetDevice(identity) != nil) { + auto device = [GetDevice(identity) internalDevice]; if (device != nullptr) { device->Disconnect(); } - mConnectedDevices[mCurrentIdentity] = nil; + mConnectedDevices[identity] = nil; } - [controller getConnectedDevice:nodeId + [controller getConnectedDevice:value.nodeId queue:mCallbackQueue completionHandler:^(CHIPDevice * _Nullable device, NSError * _Nullable error) { CHIP_ERROR err = [CHIPError errorToCHIPErrorCode:error]; VerifyOrReturn(CHIP_NO_ERROR == err, SetCommandExitStatus(err)); - mConnectedDevices[mCurrentIdentity] = device; + mConnectedDevices[identity] = device; NextTest(); }]; } /////////// CommissionerCommands-like Interface ///////// - CHIP_ERROR PairWithQRCode(chip::NodeId nodeId, const chip::CharSpan payload) + CHIP_ERROR PairWithQRCode( + const char * _Nullable identity, const chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type & value) { - CHIPDeviceController * controller = CurrentCommissioner(); + CHIPDeviceController * controller = GetCommissioner(identity); VerifyOrReturnError(controller != nil, CHIP_ERROR_INCORRECT_STATE); + SetIdentity(identity); + [controller setPairingDelegate:mPairingDelegate queue:mCallbackQueue]; - [mPairingDelegate setDeviceId:nodeId]; + [mPairingDelegate setDeviceId:value.nodeId]; [mPairingDelegate setActive:YES]; - NSString * payloadStr = [[NSString alloc] initWithBytes:payload.data() length:payload.size() encoding:NSUTF8StringEncoding]; + NSString * payloadStr = [[NSString alloc] initWithBytes:value.payload.data() + length:value.payload.size() + encoding:NSUTF8StringEncoding]; NSError * err; - BOOL ok = [controller pairDevice:nodeId onboardingPayload:payloadStr error:&err]; + BOOL ok = [controller pairDevice:value.nodeId onboardingPayload:payloadStr error:&err]; if (ok == YES) { return CHIP_NO_ERROR; } @@ -173,7 +191,7 @@ class TestCommandBridge : public CHIPCommandBridge, return CHIP_NO_ERROR; } - CHIPDevice * _Nullable GetConnectedDevice(void) { return mConnectedDevices[mCurrentIdentity]; } + CHIPDevice * _Nullable GetDevice(const char * _Nullable identity) { return mConnectedDevices[identity]; } // PairingDeleted and PairingComplete need to be public so our pairing // delegate can call them. @@ -203,12 +221,6 @@ class TestCommandBridge : public CHIPCommandBridge, } } - void SetIdentity(const char * _Nonnull name) - { - mCurrentIdentity = name; - CHIPCommandBridge::SetIdentity(name); - } - protected: dispatch_queue_t _Nullable mCallbackQueue; @@ -372,9 +384,6 @@ class TestCommandBridge : public CHIPCommandBridge, private: TestPairingDelegate * _Nonnull mPairingDelegate; - // Currently selected identity ("alpha", "beta", "gamma"). - std::string mCurrentIdentity; - // Set of our connected devices, keyed by identity. std::map mConnectedDevices; }; diff --git a/examples/chip-tool-darwin/templates/tests/partials/test_cluster.zapt b/examples/chip-tool-darwin/templates/tests/partials/test_cluster.zapt index b30dc92361cfab..ae42bdc43f834e 100644 --- a/examples/chip-tool-darwin/templates/tests/partials/test_cluster.zapt +++ b/examples/chip-tool-darwin/templates/tests/partials/test_cluster.zapt @@ -126,20 +126,15 @@ class {{filename}}: public TestCommandBridge {{#*inline "testCommand"}}Test{{asUpperCamelCase label}}_{{index}}{{/inline}} CHIP_ERROR {{>testCommand}}() { - SetIdentity("{{identity}}"); {{#if (isTestOnlyCluster cluster)}} - {{command}}( + {{#if (chip_tests_item_has_list)}}ListFreer listFreer;{{/if~}} + {{asEncodableType}} value; {{#chip_tests_item_parameters}} - {{~#not_first}}, {{/not_first~}} - {{#*inline "defaultValue"}}{{asTypedLiteral (chip_tests_config_get_default_value definedValue) (chip_tests_config_get_type definedValue)}}{{/inline}} - {{~#if (chip_tests_config_has definedValue)~}} - m{{asUpperCamelCase definedValue}}.HasValue() ? m{{asUpperCamelCase definedValue}}.Value() : {{~#if (isString type)}}chip::CharSpan::fromCharString("{{>defaultValue}}"){{else}}{{>defaultValue}}{{/if~}} - {{else}} - {{#if (isString type)}}@"{{/if}}{{definedValue}}{{#if (isString type)}}"{{/if}} - {{~/if~}} - {{/chip_tests_item_parameters}}); + {{>commandValue ns=parent.cluster container=(asPropertyValue dontUnwrapValue=true) definedValue=definedValue depth=0}} + {{/chip_tests_item_parameters}} + {{command}}("{{identity}}", value); {{else}} - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("{{identity}}"); CHIPTest{{asUpperCamelCase cluster}} * cluster = [[CHIPTest{{asUpperCamelCase cluster}} alloc] initWithDevice:device endpoint:{{endpoint}} queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); diff --git a/examples/chip-tool-darwin/templates/tests/templates.json b/examples/chip-tool-darwin/templates/tests/templates.json index 064fab84e08b67..aab4af5cd3f79f 100644 --- a/examples/chip-tool-darwin/templates/tests/templates.json +++ b/examples/chip-tool-darwin/templates/tests/templates.json @@ -3,6 +3,7 @@ "version": "chip-v1", "helpers": [ "../../../../examples/chip-tool/templates/helper.js", + "../../../../examples/chip-tool/templates/tests/helper.js", "../../../../src/app/zap-templates/partials/helper.js", "../../../../src/app/zap-templates/common/StringHelper.js", "../../../../src/app/zap-templates/templates/app/helper.js", @@ -22,6 +23,10 @@ "name": "encode_value", "path": "../../../../src/darwin/Framework/CHIP/templates/partials/encode_value.zapt" }, + { + "name": "commandValue", + "path": "../../../../examples/chip-tool/templates/tests/partials/command_value.zapt" + }, { "name": "test_cluster", "path": "partials/test_cluster.zapt" diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 7edc8fdeb48506..066eedc914bd60 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -24,6 +24,7 @@ assert(chip_build_tools) config("config") { include_dirs = [ ".", + "${chip_root}/zzz_generated/app-common/app-common", "${chip_root}/zzz_generated/chip-tool", "${chip_root}/src/lib", ] diff --git a/examples/chip-tool/commands/common/CHIPCommand.cpp b/examples/chip-tool/commands/common/CHIPCommand.cpp index 5707496b85cec3..fbddccd95e0113 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.cpp +++ b/examples/chip-tool/commands/common/CHIPCommand.cpp @@ -287,6 +287,12 @@ chip::Controller::DeviceCommissioner & CHIPCommand::CurrentCommissioner() return *item->second; } +chip::Controller::DeviceCommissioner & CHIPCommand::GetCommissioner(const char * identity) +{ + auto item = mCommissioners.find(identity); + return *item->second; +} + CHIP_ERROR CHIPCommand::ShutdownCommissioner(std::string key) { return mCommissioners[key].get()->Shutdown(); diff --git a/examples/chip-tool/commands/common/CHIPCommand.h b/examples/chip-tool/commands/common/CHIPCommand.h index c15b39588bafb4..f921ae7d168d5f 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.h +++ b/examples/chip-tool/commands/common/CHIPCommand.h @@ -107,6 +107,8 @@ class CHIPCommand : public Command // --identity "instance name" when running a command. ChipDeviceCommissioner & CurrentCommissioner(); + ChipDeviceCommissioner & GetCommissioner(const char * identity); + private: CHIP_ERROR MaybeSetUpStack(); CHIP_ERROR MaybeTearDownStack(); diff --git a/examples/chip-tool/commands/tests/TestCommand.cpp b/examples/chip-tool/commands/tests/TestCommand.cpp index ad881b5d78c43d..01739c6c6ce6d4 100644 --- a/examples/chip-tool/commands/tests/TestCommand.cpp +++ b/examples/chip-tool/commands/tests/TestCommand.cpp @@ -30,20 +30,23 @@ CHIP_ERROR TestCommand::RunCommand() return CHIP_NO_ERROR; } -CHIP_ERROR TestCommand::WaitForCommissionee(chip::NodeId nodeId) +CHIP_ERROR TestCommand::WaitForCommissionee(const char * identity, + const chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type & value) { chip::FabricIndex fabricIndex; - ReturnErrorOnFailure(CurrentCommissioner().GetFabricIndex(&fabricIndex)); + ReturnErrorOnFailure(GetCommissioner(identity).GetFabricIndex(&fabricIndex)); // // There's a chance the commissionee may have rebooted before this call here as part of a test flow // or is just starting out fresh outright. Let's make sure we're not re-using any cached CASE sessions // that will now be stale and mismatched with the peer, causing subsequent interactions to fail. // - CurrentCommissioner().SessionMgr()->ExpireAllPairings(chip::ScopedNodeId(nodeId, fabricIndex)); + GetCommissioner(identity).SessionMgr()->ExpireAllPairings(chip::ScopedNodeId(value.nodeId, fabricIndex)); - return CurrentCommissioner().GetConnectedDevice(nodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); + SetIdentity(identity); + return GetCommissioner(identity).GetConnectedDevice(value.nodeId, &mOnDeviceConnectedCallback, + &mOnDeviceConnectionFailureCallback); } void TestCommand::OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device) @@ -99,7 +102,9 @@ CHIP_ERROR TestCommand::ContinueOnChipMainThread(CHIP_ERROR err) if (CHIP_NO_ERROR == err) { - return WaitForMs(0); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 0; + return WaitForMs(GetIdentity().c_str(), value); } Exit(chip::ErrorStr(err), err); diff --git a/examples/chip-tool/commands/tests/TestCommand.h b/examples/chip-tool/commands/tests/TestCommand.h index 264b291175718e..ea613bbae4d739 100644 --- a/examples/chip-tool/commands/tests/TestCommand.h +++ b/examples/chip-tool/commands/tests/TestCommand.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include constexpr uint16_t kTimeoutInSeconds = 90; @@ -61,7 +61,8 @@ class TestCommand : public TestRunner, protected: /////////// DelayCommands Interface ///////// - CHIP_ERROR WaitForCommissionee(chip::NodeId nodeId) override; + CHIP_ERROR WaitForCommissionee(const char * identity, + const chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type & value) override; void OnWaitForMs() override { NextTest(); }; /////////// Interaction Model Interface ///////// @@ -73,7 +74,10 @@ class TestCommand : public TestRunner, CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) override; - chip::Controller::DeviceCommissioner & GetCurrentCommissioner() override { return CurrentCommissioner(); }; + chip::Controller::DeviceCommissioner & GetCommissioner(const char * identity) override + { + return CHIPCommand::GetCommissioner(identity); + }; static void ExitAsync(intptr_t context); void Exit(std::string message, CHIP_ERROR err = CHIP_ERROR_INTERNAL) override; diff --git a/examples/chip-tool/templates/tests/partials/command_value.zapt b/examples/chip-tool/templates/tests/partials/command_value.zapt index 5aa946560e0a54..307ac83a5748c8 100644 --- a/examples/chip-tool/templates/tests/partials/command_value.zapt +++ b/examples/chip-tool/templates/tests/partials/command_value.zapt @@ -38,23 +38,36 @@ {{else}} {{container}} = {{~#if (chip_tests_variables_has definedValue)~}} - {{definedValue}}; + {{definedValue}}; + {{else if (chip_tests_config_has definedValue)}} + m{{asUpperCamelCase definedValue}}.HasValue() ? m{{asUpperCamelCase definedValue}}.Value() : + {{~#if_chip_enum type~}} + static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{chip_tests_config_get_default_value definedValue}}); + {{else if (isCharString type)}} + chip::Span("{{chip_tests_config_get_default_value definedValue}}", {{utf8StringLength (chip_tests_config_get_default_value definedValue)}}); + {{else if (isOctetString type)}} + {{!-- TODO Extract the length of the default value for ByteSpan--}} + {{else}} + {{#if_is_bitmap type}} + static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{asTypedLiteral (chip_tests_config_get_default_value definedValue) type}}); + {{else}} + {{asTypedExpression (chip_tests_config_get_default_value definedValue) type}}; + {{/if_is_bitmap}} + {{/if_chip_enum~}} {{else~}} - {{~#if_chip_enum type~}} - static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{definedValue}}); - {{else if (isCharString type)}} - chip::Span("{{definedValue}}garbage: not in length on purpose", {{utf8StringLength definedValue}}); - {{else if (isOctetString type)}} - chip::ByteSpan(chip::Uint8::from_const_char("{{octetStringEscapedForCLiteral definedValue}}garbage: not in length on purpose"), {{definedValue.length}}); - {{else}} - {{#if_is_bitmap type}} - static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{asTypedLiteral definedValue type}}); - {{else if (chip_tests_config_has definedValue)}} - m{{asUpperCamelCase definedValue}}.HasValue() ? m{{asUpperCamelCase definedValue}}.Value() : {{asTypedLiteral (chip_tests_config_get_default_value definedValue) (chip_tests_config_get_type definedValue)}}; + {{~#if_chip_enum type~}} + static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{definedValue}}); + {{else if (isCharString type)}} + chip::Span("{{definedValue}}garbage: not in length on purpose", {{utf8StringLength definedValue}}); + {{else if (isOctetString type)}} + chip::ByteSpan(chip::Uint8::from_const_char("{{octetStringEscapedForCLiteral definedValue}}garbage: not in length on purpose"), {{definedValue.length}}); {{else}} - {{asTypedExpression definedValue type}}; - {{/if_is_bitmap}} - {{/if_chip_enum~}} + {{#if_is_bitmap type}} + static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{asTypedLiteral definedValue type}}); + {{else}} + {{asTypedExpression definedValue type}}; + {{/if_is_bitmap}} + {{/if_chip_enum~}} {{~/if~}} {{/if_is_struct}} diff --git a/examples/chip-tool/templates/tests/partials/test_step.zapt b/examples/chip-tool/templates/tests/partials/test_step.zapt index e4e50f2b68ee4a..9558b8a6c9d203 100644 --- a/examples/chip-tool/templates/tests/partials/test_step.zapt +++ b/examples/chip-tool/templates/tests/partials/test_step.zapt @@ -14,9 +14,7 @@ {{~#*inline "maybePrepareArguments"}} {{#unless isWait}} -{{#if (isTestOnlyCluster cluster)}} - SetIdentity({{>kIdentity}}); -{{else if hasSpecificArguments}} +{{#if hasSpecificArguments}} {{#if (chip_tests_item_has_list)}}ListFreer listFreer;{{/if~}} {{asEncodableType}} value; {{#chip_tests_item_parameters}} @@ -26,20 +24,6 @@ {{/unless}} {{/inline~}} -{{~#*inline "testOnlyClusterArguments"}} -{{#chip_tests_item_parameters}}{{#not_first}},{{/not_first}} - {{#*inline "defaultValue"}}{{asTypedLiteral (chip_tests_config_get_default_value definedValue) (chip_tests_config_get_type definedValue)}}{{/inline}} - {{~#if (chip_tests_config_has definedValue)~}} - m{{asUpperCamelCase definedValue}}.HasValue() ? m{{asUpperCamelCase definedValue}}.Value() : {{~#if (isString type)}}chip::CharSpan::fromCharString("{{>defaultValue}}"){{else}}{{>defaultValue}}{{/if~}} - {{~else if (isString type)}} - "{{definedValue}}" - {{else}} - {{definedValue}} - {{~/if~}} -{{/chip_tests_item_parameters}} -{{/inline~}} - - {{~#*inline "maybeFabricFiltered"}} {{#unless isWait}} {{#unless fabricFiltered}} @@ -66,6 +50,7 @@ {{~#*inline "eventId"}}{{>clusterName}}::Events::{{asUpperCamelCase event}}::Id{{/inline~}} {{~#*inline "commandId"}}{{>clusterName}}::Commands::{{asUpperCamelCase command}}::Id{{/inline~}} +{{~#*inline "testOnlyClusterArguments"}}{{>kIdentity}}{{/inline~}} {{~#*inline "attributeArguments"}}{{>kIdentity}}, {{>endpointId}}, {{>clusterId}}, {{>attributeId}}{{/inline~}} {{~#*inline "eventArguments"}}{{>kIdentity}}, {{>endpointId}}, {{>clusterId}}, {{>eventId}}{{/inline~}} {{~#*inline "commandArguments"}}{{>kIdentity}}, {{>endpointId}}, {{>clusterId}}, {{>commandId}}{{/inline~}} @@ -86,7 +71,7 @@ {{/inline~}} {{~#*inline "arguments"}} -{{#if (isTestOnlyCluster cluster)}}{{>testOnlyClusterArguments}} +{{#if (isTestOnlyCluster cluster)}}{{>testOnlyClusterArguments}}, value {{else if isWait}} {{>waitArguments}} {{else if isReadAttribute}} {{>attributeArguments}}{{>maybeFabricFiltered~}} {{else if isSubscribeAttribute}} {{>attributeArguments}}, {{minInterval}}, {{maxInterval}}{{>maybeFabricFiltered~}} diff --git a/examples/placeholder/linux/include/TestCommand.h b/examples/placeholder/linux/include/TestCommand.h index 6fd3655a22a70a..f40f1466c9d14e 100644 --- a/examples/placeholder/linux/include/TestCommand.h +++ b/examples/placeholder/linux/include/TestCommand.h @@ -166,7 +166,8 @@ class TestCommand : public TestRunner, /////////// DelayCommands Interface ///////// void OnWaitForMs() override { NextTest(); } - CHIP_ERROR WaitForCommissioning() override + CHIP_ERROR WaitForCommissioning(const char * identity, + const chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type & value) override { isRunning = false; return chip::DeviceLayer::PlatformMgr().AddEventHandler(OnPlatformEvent, reinterpret_cast(this)); diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 7a876814dfce53..234f1b6cf8a484 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -178,6 +178,7 @@ def getSpecificTemplatesTargets(): # Mapping of required template and output directory templates = { 'src/app/common/templates/templates.json': 'zzz_generated/app-common/app-common/zap-generated', + 'src/app/tests/suites/templates/templates.json': 'zzz_generated/app-common/app-common/zap-generated', 'examples/chip-tool/templates/templates.json': 'zzz_generated/chip-tool/zap-generated', 'examples/chip-tool-darwin/templates/templates.json': 'zzz_generated/chip-tool-darwin/zap-generated', 'src/controller/python/templates/templates.json': None, diff --git a/src/app/tests/suites/TestSystemCommands.yaml b/src/app/tests/suites/TestSystemCommands.yaml index 460d40a5badfac..c3dcf00c53b63f 100644 --- a/src/app/tests/suites/TestSystemCommands.yaml +++ b/src/app/tests/suites/TestSystemCommands.yaml @@ -69,16 +69,12 @@ tests: - label: "Stop the default accessory" command: "Stop" - - label: "Start the default accessory with all command line options" + - label: "Start the default accessory with minCommissioningTimeout only" command: "Start" arguments: values: - - name: "discriminator" - value: 1111 - - name: "port" - value: 5560 - - name: "kvs" - value: "/tmp/chip_kvs_default" + - name: "minCommissioningTimeout" + value: 10 - label: "Stop the default accessory" command: "Stop" @@ -95,6 +91,8 @@ tests: value: "/tmp/chip_kvs_default" - name: "registerKey" value: "default" + - name: "minCommissioningTimeout" + value: 10 - label: "Start a second accessory with all command line options" command: "Start" diff --git a/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp b/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp index a16fd1ad2d596c..c64e4f39339d69 100644 --- a/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp +++ b/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp @@ -20,31 +20,38 @@ constexpr uint16_t kPayloadMaxSize = 64; -CHIP_ERROR CommissionerCommands::PairWithQRCode(chip::NodeId nodeId, const chip::CharSpan payload) +CHIP_ERROR +CommissionerCommands::PairWithQRCode(const char * identity, + const chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type & value) { - VerifyOrReturnError(payload.size() > 0 && payload.size() < kPayloadMaxSize, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(value.payload.size() > 0 && value.payload.size() < kPayloadMaxSize, CHIP_ERROR_INVALID_ARGUMENT); - GetCurrentCommissioner().RegisterPairingDelegate(this); + GetCommissioner(identity).RegisterPairingDelegate(this); char qrCode[kPayloadMaxSize]; - memcpy(qrCode, payload.data(), payload.size()); - return GetCurrentCommissioner().PairDevice(nodeId, qrCode); + memset(qrCode, '\0', sizeof(qrCode)); + memcpy(qrCode, value.payload.data(), value.payload.size()); + ChipLogError(chipTool, "QRCode is %s", qrCode); + return GetCommissioner(identity).PairDevice(value.nodeId, qrCode); } -CHIP_ERROR CommissionerCommands::PairWithManualCode(chip::NodeId nodeId, const chip::CharSpan payload) +CHIP_ERROR CommissionerCommands::PairWithManualCode( + const char * identity, const chip::app::Clusters::CommissionerCommands::Commands::PairWithManualCode::Type & value) { - VerifyOrReturnError(payload.size() > 0 && payload.size() < kPayloadMaxSize, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(value.payload.size() > 0 && value.payload.size() < kPayloadMaxSize, CHIP_ERROR_INVALID_ARGUMENT); - GetCurrentCommissioner().RegisterPairingDelegate(this); + GetCommissioner(identity).RegisterPairingDelegate(this); char manualCode[kPayloadMaxSize]; - memcpy(manualCode, payload.data(), payload.size()); - return GetCurrentCommissioner().PairDevice(nodeId, manualCode); + memset(manualCode, '\0', sizeof(manualCode)); + memcpy(manualCode, value.payload.data(), value.payload.size()); + return GetCommissioner(identity).PairDevice(value.nodeId, manualCode); } -CHIP_ERROR CommissionerCommands::Unpair(chip::NodeId nodeId) +CHIP_ERROR CommissionerCommands::Unpair(const char * identity, + const chip::app::Clusters::CommissionerCommands::Commands::Unpair::Type & value) { - return GetCurrentCommissioner().UnpairDevice(nodeId); + return GetCommissioner(identity).UnpairDevice(value.nodeId); } chip::app::StatusIB ConvertToStatusIB(CHIP_ERROR err) diff --git a/src/app/tests/suites/commands/commissioner/CommissionerCommands.h b/src/app/tests/suites/commands/commissioner/CommissionerCommands.h index b840665534b92d..163903c10a96dd 100644 --- a/src/app/tests/suites/commands/commissioner/CommissionerCommands.h +++ b/src/app/tests/suites/commands/commissioner/CommissionerCommands.h @@ -21,6 +21,8 @@ #include #include +#include + class CommissionerCommands : public chip::Controller::DevicePairingDelegate { public: @@ -29,11 +31,13 @@ class CommissionerCommands : public chip::Controller::DevicePairingDelegate virtual void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) = 0; virtual CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) = 0; - virtual chip::Controller::DeviceCommissioner & GetCurrentCommissioner() = 0; + virtual chip::Controller::DeviceCommissioner & GetCommissioner(const char * identity) = 0; - CHIP_ERROR PairWithQRCode(chip::NodeId nodeId, const chip::CharSpan payload); - CHIP_ERROR PairWithManualCode(chip::NodeId nodeId, const chip::CharSpan payload); - CHIP_ERROR Unpair(chip::NodeId nodeId); + CHIP_ERROR PairWithQRCode(const char * identity, + const chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type & value); + CHIP_ERROR PairWithManualCode(const char * identity, + const chip::app::Clusters::CommissionerCommands::Commands::PairWithManualCode::Type & value); + CHIP_ERROR Unpair(const char * identity, const chip::app::Clusters::CommissionerCommands::Commands::Unpair::Type & value); /////////// DevicePairingDelegate Interface ///////// void OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) override; diff --git a/src/app/tests/suites/commands/delay/DelayCommands.cpp b/src/app/tests/suites/commands/delay/DelayCommands.cpp index 96488174b071a8..af423382e6f400 100644 --- a/src/app/tests/suites/commands/delay/DelayCommands.cpp +++ b/src/app/tests/suites/commands/delay/DelayCommands.cpp @@ -26,9 +26,10 @@ const char * getScriptsFolder() } } // namespace -CHIP_ERROR DelayCommands::WaitForMs(uint32_t ms) +CHIP_ERROR DelayCommands::WaitForMs(const char * identity, + const chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type & value) { - const auto duration = chip::System::Clock::Milliseconds32(ms); + const auto duration = chip::System::Clock::Milliseconds32(value.ms); return chip::DeviceLayer::SystemLayer().StartTimer(duration, OnWaitForMsFn, this); } @@ -38,7 +39,8 @@ void DelayCommands::OnWaitForMsFn(chip::System::Layer * systemLayer, void * cont command->OnWaitForMs(); } -CHIP_ERROR DelayCommands::WaitForCommissionableAdvertisement() +CHIP_ERROR DelayCommands::WaitForCommissionableAdvertisement( + const char * identity, const chip::app::Clusters::DelayCommands::Commands::WaitForCommissionableAdvertisement::Type & value) { const char * scriptDir = getScriptsFolder(); constexpr const char * scriptName = "WaitForCommissionableAdvertisement.py"; @@ -48,7 +50,8 @@ CHIP_ERROR DelayCommands::WaitForCommissionableAdvertisement() return RunInternal(command); } -CHIP_ERROR DelayCommands::WaitForOperationalAdvertisement() +CHIP_ERROR DelayCommands::WaitForOperationalAdvertisement( + const char * identity, const chip::app::Clusters::DelayCommands::Commands::WaitForOperationalAdvertisement::Type & value) { const char * scriptDir = getScriptsFolder(); constexpr const char * scriptName = "WaitForOperationalAdvertisement.py"; diff --git a/src/app/tests/suites/commands/delay/DelayCommands.h b/src/app/tests/suites/commands/delay/DelayCommands.h index e6b57c0883823f..84bfdcc166800b 100644 --- a/src/app/tests/suites/commands/delay/DelayCommands.h +++ b/src/app/tests/suites/commands/delay/DelayCommands.h @@ -22,6 +22,8 @@ #include #include +#include + class DelayCommands { public: @@ -31,11 +33,22 @@ class DelayCommands virtual CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) = 0; virtual void OnWaitForMs() = 0; - virtual CHIP_ERROR WaitForCommissionee(chip::NodeId nodeId) { return CHIP_ERROR_NOT_IMPLEMENTED; }; - virtual CHIP_ERROR WaitForCommissioning() { return CHIP_ERROR_NOT_IMPLEMENTED; }; - CHIP_ERROR WaitForMs(uint32_t ms); - CHIP_ERROR WaitForCommissionableAdvertisement(); - CHIP_ERROR WaitForOperationalAdvertisement(); + virtual CHIP_ERROR WaitForCommissionee(const char * identity, + const chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type & value) + { + return CHIP_ERROR_NOT_IMPLEMENTED; + }; + virtual CHIP_ERROR WaitForCommissioning(const char * identity, + const chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type & value) + { + return CHIP_ERROR_NOT_IMPLEMENTED; + }; + CHIP_ERROR WaitForMs(const char * identity, const chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type & value); + CHIP_ERROR WaitForCommissionableAdvertisement( + const char * identity, + const chip::app::Clusters::DelayCommands::Commands::WaitForCommissionableAdvertisement::Type & value); + CHIP_ERROR WaitForOperationalAdvertisement( + const char * identity, const chip::app::Clusters::DelayCommands::Commands::WaitForOperationalAdvertisement::Type & value); // Busy-wait for a given duration in milliseconds CHIP_ERROR BusyWaitFor(chip::System::Clock::Milliseconds32 durationInMs); diff --git a/src/app/tests/suites/commands/discovery/BUILD.gn b/src/app/tests/suites/commands/discovery/BUILD.gn index 5525623b0c6006..da1196f9db395e 100644 --- a/src/app/tests/suites/commands/discovery/BUILD.gn +++ b/src/app/tests/suites/commands/discovery/BUILD.gn @@ -18,6 +18,8 @@ import("//build_overrides/chip.gni") static_library("discovery") { output_name = "libDiscoveryCommands" + include_dirs = [ "${chip_root}/zzz_generated/app-common" ] + sources = [ "DiscoveryCommands.cpp", "DiscoveryCommands.h", diff --git a/src/app/tests/suites/commands/discovery/DiscoveryCommands.cpp b/src/app/tests/suites/commands/discovery/DiscoveryCommands.cpp index 320f5b63a982df..6e8fcfbd1348a4 100644 --- a/src/app/tests/suites/commands/discovery/DiscoveryCommands.cpp +++ b/src/app/tests/suites/commands/discovery/DiscoveryCommands.cpp @@ -21,7 +21,9 @@ #include #include -CHIP_ERROR DiscoveryCommands::FindCommissionable() +CHIP_ERROR +DiscoveryCommands::FindCommissionable(const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type & value) { ReturnErrorOnFailure(SetupDiscoveryCommands()); @@ -29,24 +31,30 @@ CHIP_ERROR DiscoveryCommands::FindCommissionable() return mDNSResolver.FindCommissionableNodes(filter); } -CHIP_ERROR DiscoveryCommands::FindCommissionableByShortDiscriminator(uint64_t value) +CHIP_ERROR DiscoveryCommands::FindCommissionableByShortDiscriminator( + const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type & value) { ReturnErrorOnFailure(SetupDiscoveryCommands()); - uint64_t shortDiscriminator = static_cast((value >> 8) & 0x0F); + uint64_t shortDiscriminator = static_cast((value.value >> 8) & 0x0F); chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kShortDiscriminator, shortDiscriminator); return mDNSResolver.FindCommissionableNodes(filter); } -CHIP_ERROR DiscoveryCommands::FindCommissionableByLongDiscriminator(uint64_t value) +CHIP_ERROR DiscoveryCommands::FindCommissionableByLongDiscriminator( + const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type & value) { ReturnErrorOnFailure(SetupDiscoveryCommands()); - chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kLongDiscriminator, value); + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kLongDiscriminator, value.value); return mDNSResolver.FindCommissionableNodes(filter); } -CHIP_ERROR DiscoveryCommands::FindCommissionableByCommissioningMode() +CHIP_ERROR DiscoveryCommands::FindCommissionableByCommissioningMode( + const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type & value) { ReturnErrorOnFailure(SetupDiscoveryCommands()); @@ -54,23 +62,27 @@ CHIP_ERROR DiscoveryCommands::FindCommissionableByCommissioningMode() return mDNSResolver.FindCommissionableNodes(filter); } -CHIP_ERROR DiscoveryCommands::FindCommissionableByVendorId(uint64_t value) +CHIP_ERROR DiscoveryCommands::FindCommissionableByVendorId( + const char * identity, const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type & value) { ReturnErrorOnFailure(SetupDiscoveryCommands()); - chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kVendorId, value); + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kVendorId, value.value); return mDNSResolver.FindCommissionableNodes(filter); } -CHIP_ERROR DiscoveryCommands::FindCommissionableByDeviceType(uint64_t value) +CHIP_ERROR DiscoveryCommands::FindCommissionableByDeviceType( + const char * identity, const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type & value) { ReturnErrorOnFailure(SetupDiscoveryCommands()); - chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kDeviceType, value); + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kDeviceType, value.value); return mDNSResolver.FindCommissionableNodes(filter); } -CHIP_ERROR DiscoveryCommands::FindCommissioner() +CHIP_ERROR +DiscoveryCommands::FindCommissioner(const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissioner::Type & value) { ReturnErrorOnFailure(SetupDiscoveryCommands()); @@ -78,19 +90,22 @@ CHIP_ERROR DiscoveryCommands::FindCommissioner() return mDNSResolver.FindCommissioners(filter); } -CHIP_ERROR DiscoveryCommands::FindCommissionerByVendorId(uint64_t value) +CHIP_ERROR +DiscoveryCommands::FindCommissionerByVendorId( + const char * identity, const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionerByVendorId::Type & value) { ReturnErrorOnFailure(SetupDiscoveryCommands()); - chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kVendorId, value); + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kVendorId, value.value); return mDNSResolver.FindCommissioners(filter); } -CHIP_ERROR DiscoveryCommands::FindCommissionerByDeviceType(uint64_t value) +CHIP_ERROR DiscoveryCommands::FindCommissionerByDeviceType( + const char * identity, const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionerByDeviceType::Type & value) { ReturnErrorOnFailure(SetupDiscoveryCommands()); - chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kDeviceType, value); + chip::Dnssd::DiscoveryFilter filter(chip::Dnssd::DiscoveryFilterType::kDeviceType, value.value); return mDNSResolver.FindCommissioners(filter); } @@ -125,7 +140,7 @@ void DiscoveryCommands::OnNodeDiscovered(const chip::Dnssd::DiscoveredNodeData & nodeData.LogDetail(); - DiscoveryCommandResult data; + chip::DiscoveryCommandResponse data; data.hostName = chip::CharSpan(nodeData.hostName, strlen(nodeData.hostName)); data.instanceName = chip::CharSpan(nodeData.instanceName, strlen(nodeData.instanceName)); data.longDiscriminator = nodeData.longDiscriminator; @@ -190,106 +205,3 @@ void DiscoveryCommands::OnNodeDiscovered(const chip::Dnssd::DiscoveredNodeData & chip::Platform::MemoryFree(buffer); } - -CHIP_ERROR DiscoveryCommandResult::Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const -{ - chip::TLV::TLVType outer; - ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), hostName)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), instanceName)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(2), longDiscriminator)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(3), shortDiscriminator)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(4), vendorId)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(5), productId)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(6), commissioningMode)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(7), deviceType)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(8), deviceName)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(9), rotatingId)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(10), rotatingIdLen)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(11), pairingHint)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(12), pairingInstruction)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(13), supportsTcp)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(14), numIPs)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(15), port)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(16), mrpRetryIntervalIdle)); - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(17), mrpRetryIntervalActive)); - ReturnErrorOnFailure(writer.EndContainer(outer)); - return CHIP_NO_ERROR; -} - -CHIP_ERROR DiscoveryCommandResult::Decode(chip::TLV::TLVReader & reader) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - chip::TLV::TLVType outer; - VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); - ReturnErrorOnFailure(reader.EnterContainer(outer)); - - while ((err = reader.Next()) == CHIP_NO_ERROR) - { - VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); - switch (chip::TLV::TagNumFromTag(reader.GetTag())) - { - case 0: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, hostName)); - break; - case 1: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, instanceName)); - break; - case 2: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, longDiscriminator)); - break; - case 3: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, shortDiscriminator)); - break; - case 4: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, vendorId)); - break; - case 5: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, productId)); - break; - case 6: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, commissioningMode)); - break; - case 7: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, deviceType)); - break; - case 8: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, deviceName)); - break; - case 9: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, rotatingId)); - break; - case 10: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, rotatingIdLen)); - break; - case 11: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, pairingHint)); - break; - case 12: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, pairingInstruction)); - break; - case 13: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, supportsTcp)); - break; - case 14: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, numIPs)); - break; - case 15: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, port)); - break; - case 16: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, mrpRetryIntervalIdle)); - break; - case 17: - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, mrpRetryIntervalActive)); - break; - default: - break; - } - } - - VerifyOrReturnError(err == CHIP_END_OF_TLV, err); - ReturnErrorOnFailure(reader.ExitContainer(outer)); - - return CHIP_NO_ERROR; -}; diff --git a/src/app/tests/suites/commands/discovery/DiscoveryCommands.h b/src/app/tests/suites/commands/discovery/DiscoveryCommands.h index 076e20a9e0ca7a..37fd9b4f8bf376 100644 --- a/src/app/tests/suites/commands/discovery/DiscoveryCommands.h +++ b/src/app/tests/suites/commands/discovery/DiscoveryCommands.h @@ -19,49 +19,10 @@ #pragma once #include -#include -#include #include #include -struct DiscoveryCommandResult -{ - chip::CharSpan hostName; - chip::CharSpan instanceName; - uint16_t longDiscriminator; - uint8_t shortDiscriminator; - uint16_t vendorId; - uint16_t productId; - uint8_t commissioningMode; - uint16_t deviceType; - chip::CharSpan deviceName; - chip::ByteSpan rotatingId; - uint64_t rotatingIdLen; - uint16_t pairingHint; - chip::CharSpan pairingInstruction; - bool supportsTcp; - uint8_t numIPs; - uint16_t port; - chip::Optional mrpRetryIntervalIdle; - chip::Optional mrpRetryIntervalActive; - - CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const; - CHIP_ERROR Decode(chip::TLV::TLVReader & reader); -}; - -namespace chip { -namespace app { -namespace Clusters { -namespace DiscoveryCommands { -namespace Commands { -namespace DiscoveryCommandResponse { -using DecodableType = DiscoveryCommandResult; -} -} // namespace Commands -} // namespace DiscoveryCommands -} // namespace Clusters -} // namespace app -} // namespace chip +#include class DiscoveryCommands : public chip::Dnssd::CommissioningResolveDelegate, public chip::Dnssd::OperationalResolveDelegate { @@ -72,16 +33,30 @@ class DiscoveryCommands : public chip::Dnssd::CommissioningResolveDelegate, publ virtual void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) = 0; virtual CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) = 0; - CHIP_ERROR FindCommissionable(); - CHIP_ERROR FindCommissionableByShortDiscriminator(uint64_t value); - CHIP_ERROR FindCommissionableByLongDiscriminator(uint64_t value); - CHIP_ERROR FindCommissionableByCommissioningMode(); - CHIP_ERROR FindCommissionableByVendorId(uint64_t vendorId); - CHIP_ERROR FindCommissionableByDeviceType(uint64_t deviceType); + CHIP_ERROR FindCommissionable(const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type & value); + CHIP_ERROR FindCommissionableByShortDiscriminator( + const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type & value); + CHIP_ERROR FindCommissionableByLongDiscriminator( + const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type & value); + CHIP_ERROR FindCommissionableByCommissioningMode( + const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type & value); + CHIP_ERROR FindCommissionableByVendorId( + const char * identity, const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type & value); + CHIP_ERROR FindCommissionableByDeviceType( + const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByDeviceType::Type & value); - CHIP_ERROR FindCommissioner(); - CHIP_ERROR FindCommissionerByVendorId(uint64_t vendorId); - CHIP_ERROR FindCommissionerByDeviceType(uint64_t deviceType); + CHIP_ERROR FindCommissioner(const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissioner::Type & value); + CHIP_ERROR + FindCommissionerByVendorId(const char * identity, + const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionerByVendorId::Type & value); + CHIP_ERROR FindCommissionerByDeviceType( + const char * identity, const chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionerByDeviceType::Type & value); CHIP_ERROR SetupDiscoveryCommands(); CHIP_ERROR TearDownDiscoveryCommands(); diff --git a/src/app/tests/suites/commands/log/LogCommands.cpp b/src/app/tests/suites/commands/log/LogCommands.cpp index b19bf857bc9d5e..866315cdc1573c 100644 --- a/src/app/tests/suites/commands/log/LogCommands.cpp +++ b/src/app/tests/suites/commands/log/LogCommands.cpp @@ -19,26 +19,26 @@ #include "LogCommands.h" #include -CHIP_ERROR LogCommands::Log(const char * message) +CHIP_ERROR LogCommands::Log(const char * identity, const chip::app::Clusters::LogCommands::Commands::Log::Type & value) { - ChipLogDetail(chipTool, "%s", message); + ChipLogDetail(chipTool, "%.*s", static_cast(value.message.size()), value.message.data()); return ContinueOnChipMainThread(CHIP_NO_ERROR); } -CHIP_ERROR LogCommands::UserPrompt(const char * message, const char * expectedValue) +CHIP_ERROR LogCommands::UserPrompt(const char * identity, + const chip::app::Clusters::LogCommands::Commands::UserPrompt::Type & value) { - CHIP_ERROR err = CHIP_NO_ERROR; - std::string line; - ChipLogDetail(chipTool, "USER_PROMPT: %s", message); - if (expectedValue == nullptr) - { - return ContinueOnChipMainThread(err); - } + ChipLogDetail(chipTool, "USER_PROMPT: %.*s", static_cast(value.message.size()), value.message.data()); - std::getline(std::cin, line); - if (line != expectedValue) + if (value.expectedValue.HasValue()) { - err = CHIP_ERROR_INVALID_ARGUMENT; + std::string line; + std::getline(std::cin, line); + if (line != value.expectedValue.Value().data()) + { + return ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT); + } } - return ContinueOnChipMainThread(err); + + return ContinueOnChipMainThread(CHIP_NO_ERROR); } diff --git a/src/app/tests/suites/commands/log/LogCommands.h b/src/app/tests/suites/commands/log/LogCommands.h index 7eed6a09b3dbd5..43585dff8acf2e 100644 --- a/src/app/tests/suites/commands/log/LogCommands.h +++ b/src/app/tests/suites/commands/log/LogCommands.h @@ -20,6 +20,8 @@ #include +#include + class LogCommands { public: @@ -28,6 +30,6 @@ class LogCommands virtual CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) = 0; - CHIP_ERROR Log(const char * message); - CHIP_ERROR UserPrompt(const char * message, const char * expectedValue = nullptr); + CHIP_ERROR Log(const char * identity, const chip::app::Clusters::LogCommands::Commands::Log::Type & value); + CHIP_ERROR UserPrompt(const char * identity, const chip::app::Clusters::LogCommands::Commands::UserPrompt::Type & value); }; diff --git a/src/app/tests/suites/commands/system/SystemCommands.cpp b/src/app/tests/suites/commands/system/SystemCommands.cpp index 00ee019ffc9095..24bb74ed1820cc 100644 --- a/src/app/tests/suites/commands/system/SystemCommands.cpp +++ b/src/app/tests/suites/commands/system/SystemCommands.cpp @@ -26,48 +26,95 @@ const char * getScriptsFolder() } } // namespace -constexpr size_t kCommandMaxLen = 256; +constexpr size_t kCommandMaxLen = 256; +constexpr const char * kDefaultKey = "default"; -CHIP_ERROR SystemCommands::Start(uint16_t discriminator, uint16_t port, const char * kvs, const char * registerKey) +CHIP_ERROR SystemCommands::Start(const char * identity, const chip::app::Clusters::SystemCommands::Commands::Start::Type & value) { const char * scriptDir = getScriptsFolder(); constexpr const char * scriptName = "Start.py"; char command[kCommandMaxLen]; chip::StringBuilderBase builder(command, sizeof(command)); - ReturnErrorOnFailure(CreateCommonCommandArgs(builder, scriptDir, scriptName, registerKey, discriminator, port, kvs)); + builder.Add(scriptDir); + builder.Add(scriptName); + builder.Add(" "); + + if (value.registerKey.HasValue()) + { + VerifyOrReturnError(value.registerKey.Value().size() < 128, CHIP_ERROR_INVALID_ARGUMENT); + char registerKey[128]; + memset(registerKey, '\0', sizeof(registerKey)); + strncpy(registerKey, value.registerKey.Value().data(), value.registerKey.Value().size()); + builder.Add(registerKey); + } + else + { + builder.Add(kDefaultKey); + } + + // Add any applicable optional command line options + if (value.discriminator.HasValue()) + { + builder.Add(" --discriminator "); + builder.Add(value.discriminator.Value()); + } + + if (value.port.HasValue()) + { + builder.Add(" --secured-device-port "); + builder.Add(value.port.Value()); + } + + if (value.kvs.HasValue()) + { + VerifyOrReturnError(value.kvs.Value().size() < 128, CHIP_ERROR_INVALID_ARGUMENT); + builder.Add(" --KVS "); + char kvs[128]; + memset(kvs, '\0', sizeof(kvs)); + strncpy(kvs, value.kvs.Value().data(), value.kvs.Value().size()); + builder.Add(kvs); + } + + if (value.minCommissioningTimeout.HasValue()) + { + builder.Add(" --min_commissioning_timeout "); + builder.Add(value.minCommissioningTimeout.Value()); + } + + VerifyOrReturnError(builder.Fit(), CHIP_ERROR_BUFFER_TOO_SMALL); + return RunInternal(command); } -CHIP_ERROR SystemCommands::Stop(const char * registerKey) +CHIP_ERROR SystemCommands::Stop(const char * identity, const chip::app::Clusters::SystemCommands::Commands::Stop::Type & value) { - const char * scriptDir = getScriptsFolder(); constexpr const char * scriptName = "Stop.py"; - - char command[128]; - VerifyOrReturnError(snprintf(command, sizeof(command), "%s%s %s", scriptDir, scriptName, registerKey) >= 0, - CHIP_ERROR_INTERNAL); - return RunInternal(command); + return RunInternal(scriptName, value.registerKey); } -CHIP_ERROR SystemCommands::Reboot(const char * registerKey) +CHIP_ERROR SystemCommands::Reboot(const char * identity, const chip::app::Clusters::SystemCommands::Commands::Reboot::Type & value) { - const char * scriptDir = getScriptsFolder(); constexpr const char * scriptName = "Reboot.py"; - - char command[128]; - VerifyOrReturnError(snprintf(command, sizeof(command), "%s%s %s", scriptDir, scriptName, registerKey) >= 0, - CHIP_ERROR_INTERNAL); - return RunInternal(command); + return RunInternal(scriptName, value.registerKey); } -CHIP_ERROR SystemCommands::FactoryReset(const char * registerKey) +CHIP_ERROR SystemCommands::FactoryReset(const char * identity, + const chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type & value) { - const char * scriptDir = getScriptsFolder(); constexpr const char * scriptName = "FactoryReset.py"; + return RunInternal(scriptName, value.registerKey); +} + +CHIP_ERROR SystemCommands::RunInternal(const char * scriptName, const chip::Optional registerKey) +{ + const char * scriptDir = getScriptsFolder(); + const char * registerKeyValue = registerKey.HasValue() ? registerKey.Value().data() : kDefaultKey; + const size_t registerKeyLen = registerKey.HasValue() ? registerKey.Value().size() : strlen(kDefaultKey); - char command[128]; - VerifyOrReturnError(snprintf(command, sizeof(command), "%s%s %s", scriptDir, scriptName, registerKey) >= 0, + char command[kCommandMaxLen]; + VerifyOrReturnError(snprintf(command, sizeof(command), "%s%s %.*s", scriptDir, scriptName, static_cast(registerKeyLen), + registerKeyValue) >= 0, CHIP_ERROR_INTERNAL); return RunInternal(command); } @@ -77,35 +124,3 @@ CHIP_ERROR SystemCommands::RunInternal(const char * command) VerifyOrReturnError(system(command) == 0, CHIP_ERROR_INTERNAL); return ContinueOnChipMainThread(CHIP_NO_ERROR); } - -CHIP_ERROR SystemCommands::CreateCommonCommandArgs(chip::StringBuilderBase & builder, const char * scriptDir, - const char * scriptName, const char * registerKey, uint16_t discriminator, - uint16_t port, const char * kvs) -{ - VerifyOrReturnError(registerKey != nullptr, CHIP_ERROR_INVALID_KEY_ID); - - builder.Add(scriptDir); - builder.Add(scriptName); - builder.Add(" "); - builder.Add(registerKey); - - // Add any applicable optional command line options - if (discriminator != 0xFFFF) - { - builder.Add(" --discriminator "); - builder.Add(discriminator); - } - if (port != CHIP_PORT) - { - builder.Add(" --secured-device-port "); - builder.Add(port); - } - if (kvs != nullptr) - { - builder.Add(" --KVS "); - builder.Add(kvs); - } - VerifyOrReturnError(builder.Fit(), CHIP_ERROR_BUFFER_TOO_SMALL); - - return CHIP_NO_ERROR; -} diff --git a/src/app/tests/suites/commands/system/SystemCommands.h b/src/app/tests/suites/commands/system/SystemCommands.h index dc2a285c1ac961..594fedc9d2bd8d 100644 --- a/src/app/tests/suites/commands/system/SystemCommands.h +++ b/src/app/tests/suites/commands/system/SystemCommands.h @@ -21,6 +21,8 @@ #include #include +#include + class SystemCommands { public: @@ -29,14 +31,12 @@ class SystemCommands virtual CHIP_ERROR ContinueOnChipMainThread(CHIP_ERROR err) = 0; - CHIP_ERROR Start(uint16_t discriminator = 0xFFFF, uint16_t port = CHIP_PORT, const char * kvs = nullptr, - const char * registerKey = "default"); - CHIP_ERROR Stop(const char * registerKey = "default"); - CHIP_ERROR Reboot(const char * registerKey = "default"); - CHIP_ERROR FactoryReset(const char * registerKey = "default"); + CHIP_ERROR Start(const char * identity, const chip::app::Clusters::SystemCommands::Commands::Start::Type & value); + CHIP_ERROR Stop(const char * identity, const chip::app::Clusters::SystemCommands::Commands::Stop::Type & value); + CHIP_ERROR Reboot(const char * identity, const chip::app::Clusters::SystemCommands::Commands::Reboot::Type & value); + CHIP_ERROR FactoryReset(const char * identity, const chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type & value); private: + CHIP_ERROR RunInternal(const char * scriptName, const chip::Optional registerKey); CHIP_ERROR RunInternal(const char * command); - CHIP_ERROR CreateCommonCommandArgs(chip::StringBuilderBase & builder, const char * scriptDir, const char * scriptName, - const char * registerKey, uint16_t discriminator, uint16_t port, const char * kvs); }; diff --git a/src/app/tests/suites/templates/simulated-cluster-objects.zapt b/src/app/tests/suites/templates/simulated-cluster-objects.zapt new file mode 100644 index 00000000000000..94c4ee9ff7ab88 --- /dev/null +++ b/src/app/tests/suites/templates/simulated-cluster-objects.zapt @@ -0,0 +1,132 @@ +{{>header}} + +#include +#include + +#pragma once + +namespace chip { + +{{#chip_tests_only_clusters}} +{{#chip_tests_only_cluster_commands}} + +struct {{name}}Command +{ + {{#chip_tests_only_cluster_command_parameters}} + {{zapTypeToEncodableClusterObjectType type ns=cluster}} {{name}}; + {{/chip_tests_only_cluster_command_parameters}} + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + {{#chip_tests_only_cluster_command_parameters}} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag({{index}}), {{name}})); + {{/chip_tests_only_cluster_command_parameters}} + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + {{#chip_tests_only_cluster_command_parameters}} + case {{index}}: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, {{name}})); + break; + {{/chip_tests_only_cluster_command_parameters}} + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; +{{/chip_tests_only_cluster_commands}} +{{#chip_tests_only_cluster_responses}} + +struct {{#if responseName}}{{responseName}}{{else}}{{name}}Response{{/if}} +{ + {{#chip_tests_only_cluster_response_parameters}} + {{zapTypeToEncodableClusterObjectType type}} {{name}}; + {{/chip_tests_only_cluster_response_parameters}} + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + {{#chip_tests_only_cluster_response_parameters}} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag({{index}}), {{name}})); + {{/chip_tests_only_cluster_response_parameters}} + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + {{#chip_tests_only_cluster_response_parameters}} + case {{index}}: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, {{name}})); + break; + {{/chip_tests_only_cluster_response_parameters}} + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; +{{/chip_tests_only_cluster_responses}} +{{/chip_tests_only_clusters}} + +namespace app { +namespace Clusters { +{{#chip_tests_only_clusters}} + +namespace {{name}} { +namespace Commands { +{{#chip_tests_only_cluster_commands}} +namespace {{name}} { +using Type = struct {{name}}Command; +} +{{/chip_tests_only_cluster_commands}} +{{#chip_tests_only_cluster_responses}} +namespace {{#if responseName}}{{responseName}}{{else}}{{name}}Response{{/if}} { +using DecodableType = struct {{#if responseName}}{{responseName}}{{else}}{{name}}Response{{/if}}; +} +{{/chip_tests_only_cluster_responses}} +} // namespace Commands +} // namespace {{name}} + +{{/chip_tests_only_clusters}} +} // namespace Clusters +} // namespace app + +} // namespace chip diff --git a/src/app/tests/suites/templates/templates.json b/src/app/tests/suites/templates/templates.json index 0264e435c1c6da..1658b3b11107a6 100644 --- a/src/app/tests/suites/templates/templates.json +++ b/src/app/tests/suites/templates/templates.json @@ -4,7 +4,8 @@ "helpers": [ "../../../zap-templates/common/StringHelper.js", "../../../zap-templates/templates/app/helper.js", - "../../../zap-templates/templates/chip/helper.js" + "../../../zap-templates/templates/chip/helper.js", + "../../../zap-templates/common/ClusterTestGeneration.js" ], "override": "../../../zap-templates/common/override.js", "partials": [ @@ -18,6 +19,11 @@ "path": "../../../zap-templates/templates/app/tests/CHIPClustersTest.zapt", "name": "Tests C++ API Header", "output": "tests/CHIPClustersTest.h" + }, + { + "path": "simulated-cluster-objects.zapt", + "name": "Simulated Cluster Objects Commands header", + "output": "tests/simulated-cluster-objects.h" } ] } diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index 5e690ee12701e3..0018fc5f6a1639 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -887,26 +887,139 @@ function chip_tests_item_has_list(options) }); } +function checkIsInsideTestOnlyClusterBlock(conditions, name) +{ + conditions.forEach(condition => { + if (condition == undefined) { + const errorStr = `Not inside a ({#${name}}} block.`; + console.error(errorStr); + throw new Error(errorStr); + } + }); +} + +/** + * Creates block iterator over the simulated clusters. + * + * @param {*} options + */ +async function chip_tests_only_clusters(options) +{ + const clusters = await getClusters(this); + const testOnlyClusters = clusters.filter(cluster => isTestOnlyCluster(cluster.name)); + return asBlocks.call(this, Promise.resolve(testOnlyClusters), options); +} + +/** + * Creates block iterator over the cluster commands for a given simulated cluster. + * + * This function is meant to be used inside a {{#chip_tests_only_clusters}} + * block. It will throw otherwise. + * + * @param {*} options + */ +async function chip_tests_only_cluster_commands(options) +{ + const conditions = [ isTestOnlyCluster(this.name) ]; + checkIsInsideTestOnlyClusterBlock(conditions, 'chip_tests_only_clusters'); + + const commands = await getCommands(this, this.name); + return asBlocks.call(this, Promise.resolve(commands), options); +} + +/** + * Creates block iterator over the command arguments for a given simulated cluster command. + * + * This function is meant to be used inside a {{#chip_tests_only_cluster_commands}} + * block. It will throw otherwise. + * + * @param {*} options + */ +async function chip_tests_only_cluster_command_parameters(options) +{ + const conditions = [ isTestOnlyCluster(this.parent.name), this.arguments, this.response ]; + checkIsInsideTestOnlyClusterBlock(conditions, 'chip_tests_only_cluster_commands'); + + return asBlocks.call(this, Promise.resolve(this.arguments), options); +} + +/** + * Creates block iterator over the cluster responses for a given simulated cluster. + * + * This function is meant to be used inside a {{#chip_tests_only_clusters}} + * block. It will throw otherwise. + * + * @param {*} options + */ +async function chip_tests_only_cluster_responses(options) +{ + const conditions = [ isTestOnlyCluster(this.name) ]; + checkIsInsideTestOnlyClusterBlock(conditions, 'chip_tests_only_clusters'); + + const commands = await getCommands(this, this.name); + const responses = []; + commands.forEach(command => { + if (!command.response.arguments) { + return; + } + + if (!('responseName' in command)) { + return; + } + + const alreadyExists = responses.some(item => item.responseName == command.responseName); + if (alreadyExists) { + return; + } + + command.response.responseName = command.responseName; + responses.push(command.response); + }); + + return asBlocks.call(this, Promise.resolve(responses), options); +} + +/** + * Creates block iterator over the response arguments for a given simulated cluster response. + * + * This function is meant to be used inside a {{#chip_tests_only_cluster_responses}} + * block. It will throw otherwise. + * + * @param {*} options + */ +async function chip_tests_only_cluster_response_parameters(options) +{ + const conditions = [ isTestOnlyCluster(this.parent.name), this.arguments, this.responseName ]; + checkIsInsideTestOnlyClusterBlock(conditions, 'chip_tests_only_cluster_responses'); + + return asBlocks.call(this, Promise.resolve(this.arguments), options); +} + // // Module exports // -exports.chip_tests = chip_tests; -exports.chip_tests_items = chip_tests_items; -exports.chip_tests_item_has_list = chip_tests_item_has_list; -exports.chip_tests_item_parameters = chip_tests_item_parameters; -exports.chip_tests_item_responses = chip_tests_item_responses; -exports.chip_tests_item_response_parameters = chip_tests_item_response_parameters; -exports.chip_tests_pics = chip_tests_pics; -exports.chip_tests_config = chip_tests_config; -exports.chip_tests_config_has = chip_tests_config_has; -exports.chip_tests_config_get_default_value = chip_tests_config_get_default_value; -exports.chip_tests_config_get_type = chip_tests_config_get_type; -exports.chip_tests_variables = chip_tests_variables; -exports.chip_tests_variables_has = chip_tests_variables_has; -exports.chip_tests_variables_get_type = chip_tests_variables_get_type; -exports.chip_tests_variables_is_nullable = chip_tests_variables_is_nullable; -exports.isTestOnlyCluster = isTestOnlyCluster; -exports.isLiteralNull = isLiteralNull; -exports.octetStringEscapedForCLiteral = octetStringEscapedForCLiteral; -exports.if_include_struct_item_value = if_include_struct_item_value; -exports.ensureIsArray = ensureIsArray; +exports.chip_tests = chip_tests; +exports.chip_tests_items = chip_tests_items; +exports.chip_tests_item_has_list = chip_tests_item_has_list; +exports.chip_tests_item_parameters = chip_tests_item_parameters; +exports.chip_tests_item_responses = chip_tests_item_responses; +exports.chip_tests_item_response_parameters = chip_tests_item_response_parameters; +exports.chip_tests_pics = chip_tests_pics; +exports.chip_tests_config = chip_tests_config; +exports.chip_tests_config_has = chip_tests_config_has; +exports.chip_tests_config_get_default_value = chip_tests_config_get_default_value; +exports.chip_tests_config_get_type = chip_tests_config_get_type; +exports.chip_tests_variables = chip_tests_variables; +exports.chip_tests_variables_has = chip_tests_variables_has; +exports.chip_tests_variables_get_type = chip_tests_variables_get_type; +exports.chip_tests_variables_is_nullable = chip_tests_variables_is_nullable; +exports.isTestOnlyCluster = isTestOnlyCluster; +exports.isLiteralNull = isLiteralNull; +exports.octetStringEscapedForCLiteral = octetStringEscapedForCLiteral; +exports.if_include_struct_item_value = if_include_struct_item_value; +exports.ensureIsArray = ensureIsArray; +exports.chip_tests_only_clusters = chip_tests_only_clusters; +exports.chip_tests_only_cluster_commands = chip_tests_only_cluster_commands; +exports.chip_tests_only_cluster_command_parameters = chip_tests_only_cluster_command_parameters; +exports.chip_tests_only_cluster_responses = chip_tests_only_cluster_responses; +exports.chip_tests_only_cluster_response_parameters = chip_tests_only_cluster_response_parameters; diff --git a/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js b/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js index edc1d0b8e5c841..dd84003900edd1 100644 --- a/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js +++ b/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js @@ -24,7 +24,32 @@ let SimulatedClusters = []; (async () => { const simulatedClustersPath = path.join(__dirname, 'clusters'); const simulatedClustersFiles = await fs.promises.readdir(simulatedClustersPath); - SimulatedClusters = simulatedClustersFiles.map(filename => (require(path.join(simulatedClustersPath, filename))).cluster); + SimulatedClusters = simulatedClustersFiles.map(filename => { + let cluster = (require(path.join(simulatedClustersPath, filename))).cluster; + cluster.commands.forEach(command => { + if (!('name' in command)) { + console.error('Error in: ' + filename + '. Missing command name.'); + throw new Error(); + } + + if (!('arguments' in command)) { + command.arguments = []; + } + + if (!('response' in command)) { + command.response = { arguments : [] }; + } + + if (command.arguments.length) { + command.hasSpecificArguments = true; + } + + if (command.response.arguments.length) { + command.hasSpecificResponse = true; + } + }); + return cluster; + }); return SimulatedClusters; })(); diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/CommissionerCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/CommissionerCommands.js index 6fddf9fe04faaa..749d8881c4703f 100644 --- a/src/app/zap-templates/common/simulated-clusters/clusters/CommissionerCommands.js +++ b/src/app/zap-templates/common/simulated-clusters/clusters/CommissionerCommands.js @@ -27,19 +27,16 @@ const PairWithQRCode = { name : 'PairWithQRCode', arguments : [ { type : 'NODE_ID', name : 'nodeId' }, { type : 'CHAR_STRING', name : 'payload' } ], - response : { arguments : [] } }; const PairWithManualCode = { name : 'PairWithManualCode', arguments : [ { type : 'NODE_ID', name : 'nodeId' }, { type : 'CHAR_STRING', name : 'payload' } ], - response : { arguments : [] } }; const Unpair = { name : 'Unpair', arguments : [ { type : 'NODE_ID', name : 'nodeId' } ], - response : { arguments : [] } }; const name = 'CommissionerCommands'; diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/DelayCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/DelayCommands.js index d2f9229cab8a65..5e207f81754424 100644 --- a/src/app/zap-templates/common/simulated-clusters/clusters/DelayCommands.js +++ b/src/app/zap-templates/common/simulated-clusters/clusters/DelayCommands.js @@ -27,31 +27,23 @@ const WaitForMs = { name : 'WaitForMs', arguments : [ { type : 'INT32U', name : 'ms' } ], - response : { arguments : [] } }; const WaitForCommissioning = { name : 'WaitForCommissioning', - arguments : [], - response : { arguments : [] } }; const WaitForCommissionee = { name : 'WaitForCommissionee', arguments : [ { type : 'NODE_ID', name : 'nodeId' } ], - response : { arguments : [] } }; const WaitForCommissionableAdvertisement = { name : 'WaitForCommissionableAdvertisement', - arguments : [], - response : { arguments : [] } }; const WaitForOperationalAdvertisement = { name : 'WaitForOperationalAdvertisement', - arguments : [], - response : { arguments : [] } }; const name = 'DelayCommands'; diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js index 627db19b77a75b..7579b69d176f20 100644 --- a/src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js +++ b/src/app/zap-templates/common/simulated-clusters/clusters/DiscoveryCommands.js @@ -68,8 +68,6 @@ const kDefaultResponse = { const FindCommissionable = { name : 'FindCommissionable', - arguments : [], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; @@ -77,7 +75,6 @@ const FindCommissionable = { const FindCommissionableByShortDiscriminator = { name : 'FindCommissionableByShortDiscriminator', arguments : [ kNumberValueArgument ], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; @@ -85,7 +82,6 @@ const FindCommissionableByShortDiscriminator = { const FindCommissionableByLongDiscriminator = { name : 'FindCommissionableByLongDiscriminator', arguments : [ kNumberValueArgument ], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; @@ -93,15 +89,12 @@ const FindCommissionableByLongDiscriminator = { const FindCommissionableByCompressedFabricId = { name : 'FindOperationalByCompressedFabricId', arguments : [ kNumberValueArgument ], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; const FindCommissionableByCommissioningMode = { name : 'FindCommissionableByCommissioningMode', - arguments : [], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; @@ -109,7 +102,6 @@ const FindCommissionableByCommissioningMode = { const FindCommissionableByVendorId = { name : 'FindCommissionableByVendorId', arguments : [ kNumberValueArgument ], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; @@ -117,7 +109,6 @@ const FindCommissionableByVendorId = { const FindCommissionableByDeviceType = { name : 'FindCommissionableByDeviceType', arguments : [ kNumberValueArgument ], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; @@ -125,7 +116,6 @@ const FindCommissionableByDeviceType = { const FindCommissionableByName = { name : 'FindCommissionableByName', arguments : [ kStringValueArgument ], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; @@ -136,16 +126,13 @@ const FindCommissionableByName = { const FindCommissioner = { name : 'FindCommissioner', - arguments : [], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; const FindCommissionerByVendorId = { - name : 'FindCommissionableByVendorId', + name : 'FindCommissionerByVendorId', arguments : [ kNumberValueArgument ], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; @@ -153,7 +140,6 @@ const FindCommissionerByVendorId = { const FindCommissionerByDeviceType = { name : 'FindCommissionerByDeviceType', arguments : [ kNumberValueArgument ], - hasSpecificResponse : true, responseName : 'DiscoveryCommandResponse', response : kDefaultResponse }; diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/LogCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/LogCommands.js index 107a2548fbec3f..3be33a01651a6b 100644 --- a/src/app/zap-templates/common/simulated-clusters/clusters/LogCommands.js +++ b/src/app/zap-templates/common/simulated-clusters/clusters/LogCommands.js @@ -27,13 +27,11 @@ const Log = { name : 'Log', arguments : [ { type : 'CHAR_STRING', name : 'message' } ], - response : { arguments : [] } }; const UserPrompt = { name : 'UserPrompt', arguments : [ { type : 'CHAR_STRING', name : 'message' }, { type : 'CHAR_STRING', name : 'expectedValue', isOptional : true } ], - response : { arguments : [] } }; const LogCommands = { diff --git a/src/app/zap-templates/common/simulated-clusters/clusters/SystemCommands.js b/src/app/zap-templates/common/simulated-clusters/clusters/SystemCommands.js index ab3d8bb8164b78..516555f68a1778 100644 --- a/src/app/zap-templates/common/simulated-clusters/clusters/SystemCommands.js +++ b/src/app/zap-templates/common/simulated-clusters/clusters/SystemCommands.js @@ -28,27 +28,25 @@ const Start = { name : 'Start', arguments : [ { 'name' : 'discriminator', type : 'INT16U', isOptional : true }, { 'name' : 'port', type : 'INT16U', isOptional : true }, - { 'name' : 'kvs', type : 'CHAR_STRING', isOptional : true }, { 'name' : 'registerKey', type : 'CHAR_STRING', isOptional : true } + { 'name' : 'kvs', type : 'CHAR_STRING', isOptional : true }, + { 'name' : 'minCommissioningTimeout', type : 'INT16U', isOptional : true }, + { 'name' : 'registerKey', type : 'CHAR_STRING', isOptional : true } ], - response : { arguments : [] } }; const Stop = { name : 'Stop', arguments : [ { 'name' : 'registerKey', type : 'CHAR_STRING', isOptional : true } ], - response : { arguments : [] } }; const Reboot = { name : 'Reboot', arguments : [ { 'name' : 'registerKey', type : 'CHAR_STRING', isOptional : true } ], - response : { arguments : [] } }; const FactoryReset = { name : 'FactoryReset', arguments : [ { 'name' : 'registerKey', type : 'CHAR_STRING', isOptional : true } ], - response : { arguments : [] } }; const SystemCommands = { diff --git a/zzz_generated/app-common/app-common/zap-generated/tests/CHIPClustersTest.h b/zzz_generated/app-common/app-common/zap-generated/tests/CHIPClustersTest.h new file mode 100644 index 00000000000000..1ce2c847eec35a --- /dev/null +++ b/zzz_generated/app-common/app-common/zap-generated/tests/CHIPClustersTest.h @@ -0,0 +1,476 @@ +/* + * + * 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. + */ + +// THIS FILE IS GENERATED BY ZAP + +#pragma once + +#include + +namespace chip { +namespace Controller { + +class DLL_EXPORT AccessControlClusterTest : public AccessControlCluster +{ +public: + AccessControlClusterTest() : AccessControlCluster() {} + ~AccessControlClusterTest() {} +}; + +class DLL_EXPORT AccountLoginClusterTest : public AccountLoginCluster +{ +public: + AccountLoginClusterTest() : AccountLoginCluster() {} + ~AccountLoginClusterTest() {} +}; + +class DLL_EXPORT AdministratorCommissioningClusterTest : public AdministratorCommissioningCluster +{ +public: + AdministratorCommissioningClusterTest() : AdministratorCommissioningCluster() {} + ~AdministratorCommissioningClusterTest() {} +}; + +class DLL_EXPORT ApplicationBasicClusterTest : public ApplicationBasicCluster +{ +public: + ApplicationBasicClusterTest() : ApplicationBasicCluster() {} + ~ApplicationBasicClusterTest() {} +}; + +class DLL_EXPORT ApplicationLauncherClusterTest : public ApplicationLauncherCluster +{ +public: + ApplicationLauncherClusterTest() : ApplicationLauncherCluster() {} + ~ApplicationLauncherClusterTest() {} +}; + +class DLL_EXPORT AudioOutputClusterTest : public AudioOutputCluster +{ +public: + AudioOutputClusterTest() : AudioOutputCluster() {} + ~AudioOutputClusterTest() {} +}; + +class DLL_EXPORT BarrierControlClusterTest : public BarrierControlCluster +{ +public: + BarrierControlClusterTest() : BarrierControlCluster() {} + ~BarrierControlClusterTest() {} +}; + +class DLL_EXPORT BasicClusterTest : public BasicCluster +{ +public: + BasicClusterTest() : BasicCluster() {} + ~BasicClusterTest() {} +}; + +class DLL_EXPORT BinaryInputBasicClusterTest : public BinaryInputBasicCluster +{ +public: + BinaryInputBasicClusterTest() : BinaryInputBasicCluster() {} + ~BinaryInputBasicClusterTest() {} +}; + +class DLL_EXPORT BindingClusterTest : public BindingCluster +{ +public: + BindingClusterTest() : BindingCluster() {} + ~BindingClusterTest() {} +}; + +class DLL_EXPORT BooleanStateClusterTest : public BooleanStateCluster +{ +public: + BooleanStateClusterTest() : BooleanStateCluster() {} + ~BooleanStateClusterTest() {} +}; + +class DLL_EXPORT BridgedActionsClusterTest : public BridgedActionsCluster +{ +public: + BridgedActionsClusterTest() : BridgedActionsCluster() {} + ~BridgedActionsClusterTest() {} +}; + +class DLL_EXPORT BridgedDeviceBasicClusterTest : public BridgedDeviceBasicCluster +{ +public: + BridgedDeviceBasicClusterTest() : BridgedDeviceBasicCluster() {} + ~BridgedDeviceBasicClusterTest() {} +}; + +class DLL_EXPORT ChannelClusterTest : public ChannelCluster +{ +public: + ChannelClusterTest() : ChannelCluster() {} + ~ChannelClusterTest() {} +}; + +class DLL_EXPORT ColorControlClusterTest : public ColorControlCluster +{ +public: + ColorControlClusterTest() : ColorControlCluster() {} + ~ColorControlClusterTest() {} +}; + +class DLL_EXPORT ContentLauncherClusterTest : public ContentLauncherCluster +{ +public: + ContentLauncherClusterTest() : ContentLauncherCluster() {} + ~ContentLauncherClusterTest() {} +}; + +class DLL_EXPORT DescriptorClusterTest : public DescriptorCluster +{ +public: + DescriptorClusterTest() : DescriptorCluster() {} + ~DescriptorClusterTest() {} +}; + +class DLL_EXPORT DiagnosticLogsClusterTest : public DiagnosticLogsCluster +{ +public: + DiagnosticLogsClusterTest() : DiagnosticLogsCluster() {} + ~DiagnosticLogsClusterTest() {} +}; + +class DLL_EXPORT DoorLockClusterTest : public DoorLockCluster +{ +public: + DoorLockClusterTest() : DoorLockCluster() {} + ~DoorLockClusterTest() {} +}; + +class DLL_EXPORT ElectricalMeasurementClusterTest : public ElectricalMeasurementCluster +{ +public: + ElectricalMeasurementClusterTest() : ElectricalMeasurementCluster() {} + ~ElectricalMeasurementClusterTest() {} +}; + +class DLL_EXPORT EthernetNetworkDiagnosticsClusterTest : public EthernetNetworkDiagnosticsCluster +{ +public: + EthernetNetworkDiagnosticsClusterTest() : EthernetNetworkDiagnosticsCluster() {} + ~EthernetNetworkDiagnosticsClusterTest() {} +}; + +class DLL_EXPORT FanControlClusterTest : public FanControlCluster +{ +public: + FanControlClusterTest() : FanControlCluster() {} + ~FanControlClusterTest() {} +}; + +class DLL_EXPORT FixedLabelClusterTest : public FixedLabelCluster +{ +public: + FixedLabelClusterTest() : FixedLabelCluster() {} + ~FixedLabelClusterTest() {} +}; + +class DLL_EXPORT FlowMeasurementClusterTest : public FlowMeasurementCluster +{ +public: + FlowMeasurementClusterTest() : FlowMeasurementCluster() {} + ~FlowMeasurementClusterTest() {} +}; + +class DLL_EXPORT GeneralCommissioningClusterTest : public GeneralCommissioningCluster +{ +public: + GeneralCommissioningClusterTest() : GeneralCommissioningCluster() {} + ~GeneralCommissioningClusterTest() {} +}; + +class DLL_EXPORT GeneralDiagnosticsClusterTest : public GeneralDiagnosticsCluster +{ +public: + GeneralDiagnosticsClusterTest() : GeneralDiagnosticsCluster() {} + ~GeneralDiagnosticsClusterTest() {} +}; + +class DLL_EXPORT GroupKeyManagementClusterTest : public GroupKeyManagementCluster +{ +public: + GroupKeyManagementClusterTest() : GroupKeyManagementCluster() {} + ~GroupKeyManagementClusterTest() {} +}; + +class DLL_EXPORT GroupsClusterTest : public GroupsCluster +{ +public: + GroupsClusterTest() : GroupsCluster() {} + ~GroupsClusterTest() {} +}; + +class DLL_EXPORT IdentifyClusterTest : public IdentifyCluster +{ +public: + IdentifyClusterTest() : IdentifyCluster() {} + ~IdentifyClusterTest() {} +}; + +class DLL_EXPORT IlluminanceMeasurementClusterTest : public IlluminanceMeasurementCluster +{ +public: + IlluminanceMeasurementClusterTest() : IlluminanceMeasurementCluster() {} + ~IlluminanceMeasurementClusterTest() {} +}; + +class DLL_EXPORT KeypadInputClusterTest : public KeypadInputCluster +{ +public: + KeypadInputClusterTest() : KeypadInputCluster() {} + ~KeypadInputClusterTest() {} +}; + +class DLL_EXPORT LevelControlClusterTest : public LevelControlCluster +{ +public: + LevelControlClusterTest() : LevelControlCluster() {} + ~LevelControlClusterTest() {} +}; + +class DLL_EXPORT LocalizationConfigurationClusterTest : public LocalizationConfigurationCluster +{ +public: + LocalizationConfigurationClusterTest() : LocalizationConfigurationCluster() {} + ~LocalizationConfigurationClusterTest() {} +}; + +class DLL_EXPORT LowPowerClusterTest : public LowPowerCluster +{ +public: + LowPowerClusterTest() : LowPowerCluster() {} + ~LowPowerClusterTest() {} +}; + +class DLL_EXPORT MediaInputClusterTest : public MediaInputCluster +{ +public: + MediaInputClusterTest() : MediaInputCluster() {} + ~MediaInputClusterTest() {} +}; + +class DLL_EXPORT MediaPlaybackClusterTest : public MediaPlaybackCluster +{ +public: + MediaPlaybackClusterTest() : MediaPlaybackCluster() {} + ~MediaPlaybackClusterTest() {} +}; + +class DLL_EXPORT ModeSelectClusterTest : public ModeSelectCluster +{ +public: + ModeSelectClusterTest() : ModeSelectCluster() {} + ~ModeSelectClusterTest() {} +}; + +class DLL_EXPORT NetworkCommissioningClusterTest : public NetworkCommissioningCluster +{ +public: + NetworkCommissioningClusterTest() : NetworkCommissioningCluster() {} + ~NetworkCommissioningClusterTest() {} +}; + +class DLL_EXPORT OtaSoftwareUpdateProviderClusterTest : public OtaSoftwareUpdateProviderCluster +{ +public: + OtaSoftwareUpdateProviderClusterTest() : OtaSoftwareUpdateProviderCluster() {} + ~OtaSoftwareUpdateProviderClusterTest() {} +}; + +class DLL_EXPORT OtaSoftwareUpdateRequestorClusterTest : public OtaSoftwareUpdateRequestorCluster +{ +public: + OtaSoftwareUpdateRequestorClusterTest() : OtaSoftwareUpdateRequestorCluster() {} + ~OtaSoftwareUpdateRequestorClusterTest() {} +}; + +class DLL_EXPORT OccupancySensingClusterTest : public OccupancySensingCluster +{ +public: + OccupancySensingClusterTest() : OccupancySensingCluster() {} + ~OccupancySensingClusterTest() {} +}; + +class DLL_EXPORT OnOffClusterTest : public OnOffCluster +{ +public: + OnOffClusterTest() : OnOffCluster() {} + ~OnOffClusterTest() {} +}; + +class DLL_EXPORT OnOffSwitchConfigurationClusterTest : public OnOffSwitchConfigurationCluster +{ +public: + OnOffSwitchConfigurationClusterTest() : OnOffSwitchConfigurationCluster() {} + ~OnOffSwitchConfigurationClusterTest() {} +}; + +class DLL_EXPORT OperationalCredentialsClusterTest : public OperationalCredentialsCluster +{ +public: + OperationalCredentialsClusterTest() : OperationalCredentialsCluster() {} + ~OperationalCredentialsClusterTest() {} +}; + +class DLL_EXPORT PowerSourceClusterTest : public PowerSourceCluster +{ +public: + PowerSourceClusterTest() : PowerSourceCluster() {} + ~PowerSourceClusterTest() {} +}; + +class DLL_EXPORT PowerSourceConfigurationClusterTest : public PowerSourceConfigurationCluster +{ +public: + PowerSourceConfigurationClusterTest() : PowerSourceConfigurationCluster() {} + ~PowerSourceConfigurationClusterTest() {} +}; + +class DLL_EXPORT PressureMeasurementClusterTest : public PressureMeasurementCluster +{ +public: + PressureMeasurementClusterTest() : PressureMeasurementCluster() {} + ~PressureMeasurementClusterTest() {} +}; + +class DLL_EXPORT PumpConfigurationAndControlClusterTest : public PumpConfigurationAndControlCluster +{ +public: + PumpConfigurationAndControlClusterTest() : PumpConfigurationAndControlCluster() {} + ~PumpConfigurationAndControlClusterTest() {} +}; + +class DLL_EXPORT RelativeHumidityMeasurementClusterTest : public RelativeHumidityMeasurementCluster +{ +public: + RelativeHumidityMeasurementClusterTest() : RelativeHumidityMeasurementCluster() {} + ~RelativeHumidityMeasurementClusterTest() {} +}; + +class DLL_EXPORT ScenesClusterTest : public ScenesCluster +{ +public: + ScenesClusterTest() : ScenesCluster() {} + ~ScenesClusterTest() {} +}; + +class DLL_EXPORT SoftwareDiagnosticsClusterTest : public SoftwareDiagnosticsCluster +{ +public: + SoftwareDiagnosticsClusterTest() : SoftwareDiagnosticsCluster() {} + ~SoftwareDiagnosticsClusterTest() {} +}; + +class DLL_EXPORT SwitchClusterTest : public SwitchCluster +{ +public: + SwitchClusterTest() : SwitchCluster() {} + ~SwitchClusterTest() {} +}; + +class DLL_EXPORT TargetNavigatorClusterTest : public TargetNavigatorCluster +{ +public: + TargetNavigatorClusterTest() : TargetNavigatorCluster() {} + ~TargetNavigatorClusterTest() {} +}; + +class DLL_EXPORT TemperatureMeasurementClusterTest : public TemperatureMeasurementCluster +{ +public: + TemperatureMeasurementClusterTest() : TemperatureMeasurementCluster() {} + ~TemperatureMeasurementClusterTest() {} +}; + +class DLL_EXPORT TestClusterClusterTest : public TestClusterCluster +{ +public: + TestClusterClusterTest() : TestClusterCluster() {} + ~TestClusterClusterTest() {} +}; + +class DLL_EXPORT ThermostatClusterTest : public ThermostatCluster +{ +public: + ThermostatClusterTest() : ThermostatCluster() {} + ~ThermostatClusterTest() {} +}; + +class DLL_EXPORT ThermostatUserInterfaceConfigurationClusterTest : public ThermostatUserInterfaceConfigurationCluster +{ +public: + ThermostatUserInterfaceConfigurationClusterTest() : ThermostatUserInterfaceConfigurationCluster() {} + ~ThermostatUserInterfaceConfigurationClusterTest() {} +}; + +class DLL_EXPORT ThreadNetworkDiagnosticsClusterTest : public ThreadNetworkDiagnosticsCluster +{ +public: + ThreadNetworkDiagnosticsClusterTest() : ThreadNetworkDiagnosticsCluster() {} + ~ThreadNetworkDiagnosticsClusterTest() {} +}; + +class DLL_EXPORT TimeFormatLocalizationClusterTest : public TimeFormatLocalizationCluster +{ +public: + TimeFormatLocalizationClusterTest() : TimeFormatLocalizationCluster() {} + ~TimeFormatLocalizationClusterTest() {} +}; + +class DLL_EXPORT UnitLocalizationClusterTest : public UnitLocalizationCluster +{ +public: + UnitLocalizationClusterTest() : UnitLocalizationCluster() {} + ~UnitLocalizationClusterTest() {} +}; + +class DLL_EXPORT UserLabelClusterTest : public UserLabelCluster +{ +public: + UserLabelClusterTest() : UserLabelCluster() {} + ~UserLabelClusterTest() {} +}; + +class DLL_EXPORT WakeOnLanClusterTest : public WakeOnLanCluster +{ +public: + WakeOnLanClusterTest() : WakeOnLanCluster() {} + ~WakeOnLanClusterTest() {} +}; + +class DLL_EXPORT WiFiNetworkDiagnosticsClusterTest : public WiFiNetworkDiagnosticsCluster +{ +public: + WiFiNetworkDiagnosticsClusterTest() : WiFiNetworkDiagnosticsCluster() {} + ~WiFiNetworkDiagnosticsClusterTest() {} +}; + +class DLL_EXPORT WindowCoveringClusterTest : public WindowCoveringCluster +{ +public: + WindowCoveringClusterTest() : WindowCoveringCluster() {} + ~WindowCoveringClusterTest() {} +}; + +} // namespace Controller +} // namespace chip diff --git a/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h new file mode 100644 index 00000000000000..80a62f725a60b0 --- /dev/null +++ b/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h @@ -0,0 +1,1223 @@ +/* + * + * 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. + */ + +// THIS FILE IS GENERATED BY ZAP + +#include +#include + +#pragma once + +namespace chip { + +struct PairWithQRCodeCommand +{ + chip::NodeId nodeId; + chip::CharSpan payload; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), nodeId)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), payload)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, nodeId)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, payload)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct PairWithManualCodeCommand +{ + chip::NodeId nodeId; + chip::CharSpan payload; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), nodeId)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), payload)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, nodeId)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, payload)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct UnpairCommand +{ + chip::NodeId nodeId; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), nodeId)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, nodeId)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct WaitForMsCommand +{ + uint32_t ms; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), ms)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, ms)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct WaitForCommissioningCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct WaitForCommissioneeCommand +{ + chip::NodeId nodeId; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), nodeId)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, nodeId)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct WaitForCommissionableAdvertisementCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct WaitForOperationalAdvertisementCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByShortDiscriminatorCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByLongDiscriminatorCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByCommissioningModeCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByVendorIdCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByDeviceTypeCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByNameCommand +{ + chip::CharSpan value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionerCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionerByVendorIdCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionerByDeviceTypeCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct DiscoveryCommandResponse +{ + chip::CharSpan hostName; + chip::CharSpan instanceName; + uint16_t longDiscriminator; + uint8_t shortDiscriminator; + uint16_t vendorId; + uint16_t productId; + uint8_t commissioningMode; + uint16_t deviceType; + chip::CharSpan deviceName; + chip::ByteSpan rotatingId; + uint64_t rotatingIdLen; + uint16_t pairingHint; + chip::CharSpan pairingInstruction; + bool supportsTcp; + uint8_t numIPs; + uint16_t port; + Optional mrpRetryIntervalIdle; + Optional mrpRetryIntervalActive; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), hostName)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), instanceName)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(2), longDiscriminator)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(3), shortDiscriminator)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(4), vendorId)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(5), productId)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(6), commissioningMode)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(7), deviceType)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(8), deviceName)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(9), rotatingId)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(10), rotatingIdLen)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(11), pairingHint)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(12), pairingInstruction)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(13), supportsTcp)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(14), numIPs)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(15), port)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(16), mrpRetryIntervalIdle)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(17), mrpRetryIntervalActive)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, hostName)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, instanceName)); + break; + case 2: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, longDiscriminator)); + break; + case 3: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, shortDiscriminator)); + break; + case 4: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, vendorId)); + break; + case 5: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, productId)); + break; + case 6: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, commissioningMode)); + break; + case 7: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, deviceType)); + break; + case 8: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, deviceName)); + break; + case 9: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, rotatingId)); + break; + case 10: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, rotatingIdLen)); + break; + case 11: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, pairingHint)); + break; + case 12: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, pairingInstruction)); + break; + case 13: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, supportsTcp)); + break; + case 14: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, numIPs)); + break; + case 15: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, port)); + break; + case 16: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, mrpRetryIntervalIdle)); + break; + case 17: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, mrpRetryIntervalActive)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct LogCommand +{ + chip::CharSpan message; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), message)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, message)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct UserPromptCommand +{ + chip::CharSpan message; + Optional expectedValue; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), message)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), expectedValue)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, message)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, expectedValue)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct StartCommand +{ + Optional discriminator; + Optional port; + Optional kvs; + Optional minCommissioningTimeout; + Optional registerKey; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), discriminator)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), port)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(2), kvs)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(3), minCommissioningTimeout)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(4), registerKey)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, discriminator)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, port)); + break; + case 2: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, kvs)); + break; + case 3: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, minCommissioningTimeout)); + break; + case 4: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, registerKey)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct StopCommand +{ + Optional registerKey; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), registerKey)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, registerKey)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct RebootCommand +{ + Optional registerKey; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), registerKey)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, registerKey)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FactoryResetCommand +{ + Optional registerKey; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), registerKey)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, registerKey)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +namespace app { +namespace Clusters { + +namespace CommissionerCommands { +namespace Commands { +namespace PairWithQRCode { +using Type = struct PairWithQRCodeCommand; +} +namespace PairWithManualCode { +using Type = struct PairWithManualCodeCommand; +} +namespace Unpair { +using Type = struct UnpairCommand; +} +} // namespace Commands +} // namespace CommissionerCommands + +namespace DelayCommands { +namespace Commands { +namespace WaitForMs { +using Type = struct WaitForMsCommand; +} +namespace WaitForCommissioning { +using Type = struct WaitForCommissioningCommand; +} +namespace WaitForCommissionee { +using Type = struct WaitForCommissioneeCommand; +} +namespace WaitForCommissionableAdvertisement { +using Type = struct WaitForCommissionableAdvertisementCommand; +} +namespace WaitForOperationalAdvertisement { +using Type = struct WaitForOperationalAdvertisementCommand; +} +} // namespace Commands +} // namespace DelayCommands + +namespace DiscoveryCommands { +namespace Commands { +namespace FindCommissionable { +using Type = struct FindCommissionableCommand; +} +namespace FindCommissionableByShortDiscriminator { +using Type = struct FindCommissionableByShortDiscriminatorCommand; +} +namespace FindCommissionableByLongDiscriminator { +using Type = struct FindCommissionableByLongDiscriminatorCommand; +} +namespace FindCommissionableByCommissioningMode { +using Type = struct FindCommissionableByCommissioningModeCommand; +} +namespace FindCommissionableByVendorId { +using Type = struct FindCommissionableByVendorIdCommand; +} +namespace FindCommissionableByDeviceType { +using Type = struct FindCommissionableByDeviceTypeCommand; +} +namespace FindCommissionableByName { +using Type = struct FindCommissionableByNameCommand; +} +namespace FindCommissioner { +using Type = struct FindCommissionerCommand; +} +namespace FindCommissionerByVendorId { +using Type = struct FindCommissionerByVendorIdCommand; +} +namespace FindCommissionerByDeviceType { +using Type = struct FindCommissionerByDeviceTypeCommand; +} +namespace DiscoveryCommandResponse { +using DecodableType = struct DiscoveryCommandResponse; +} +} // namespace Commands +} // namespace DiscoveryCommands + +namespace LogCommands { +namespace Commands { +namespace Log { +using Type = struct LogCommand; +} +namespace UserPrompt { +using Type = struct UserPromptCommand; +} +} // namespace Commands +} // namespace LogCommands + +namespace SystemCommands { +namespace Commands { +namespace Start { +using Type = struct StartCommand; +} +namespace Stop { +using Type = struct StopCommand; +} +namespace Reboot { +using Type = struct RebootCommand; +} +namespace FactoryReset { +using Type = struct FactoryResetCommand; +} +} // namespace Commands +} // namespace SystemCommands + +} // namespace Clusters +} // namespace app + +} // namespace chip diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index 7a7189647d7d89..17c45e6cdb6a5d 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -456,15 +456,15 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestWaitForCommissionee_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWriteEntries_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -576,8 +576,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestVerify_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -832,8 +831,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestWriteEntriesEmptyLists_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -876,8 +874,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestVerify_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -922,8 +919,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestWriteEntryInvalidPrivilege_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -959,8 +955,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestVerify_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -995,8 +990,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestWriteEntryInvalidAuthMode_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1032,8 +1026,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestVerify_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1068,8 +1061,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestWriteEntryInvalidSubject_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1109,8 +1101,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestVerify_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1145,8 +1136,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestWriteEntryInvalidTarget_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1190,8 +1180,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestVerify_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1226,8 +1215,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestWriteEntryTooManySubjects_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1286,8 +1274,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestVerify_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1322,8 +1309,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestWriteEntryTooManyTargets_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1462,8 +1448,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestVerify_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1498,8 +1483,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestRestoreAcl_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1529,8 +1513,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestVerify_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1565,8 +1548,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestValidateResourceMinimaSubjectsPerAccessControlEntry_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1588,8 +1570,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestValidateResourceMinimaTargetsPerAccessControlEntry_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1611,8 +1592,7 @@ class TestAccessControlCluster : public TestCommandBridge { CHIP_ERROR TestValidateResourceMinimaAccessControlEntriesPerFabric_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -1761,15 +1741,15 @@ class Test_TC_BI_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -1793,8 +1773,7 @@ class Test_TC_BI_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -1814,8 +1793,7 @@ class Test_TC_BI_1_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -1838,8 +1816,7 @@ class Test_TC_BI_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -1863,8 +1840,7 @@ class Test_TC_BI_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -1884,8 +1860,7 @@ class Test_TC_BI_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -1905,8 +1880,7 @@ class Test_TC_BI_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2083,15 +2057,15 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadMandatoryNonGlobalAttributeOutOfService_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2115,8 +2089,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsOutOfService_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2136,8 +2109,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeOutOfService_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2160,8 +2132,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeOutOfService_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2185,8 +2156,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsPresentValue_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2206,8 +2176,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributePresentValue_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2230,8 +2199,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributePresentValue_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2255,8 +2223,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadMandatoryNonGlobalAttributeStatusFlags_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2280,8 +2247,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsStatusFlags_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2308,8 +2274,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryNonGlobalAttributeStatusFlags_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2331,8 +2296,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackTheMandatoryNonGlobalAttributeStatusFlags_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2521,15 +2485,15 @@ class Test_TC_BI_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsPresentValueAttributeFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2553,8 +2517,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsOutOfServiceAttributeFromDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2578,8 +2541,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2603,8 +2565,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsPresentValueAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2628,8 +2589,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsOutOfServiceAttributeFromDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2653,8 +2613,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2678,8 +2637,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2703,8 +2661,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -2866,15 +2823,15 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -2896,8 +2853,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -2915,8 +2871,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -2944,15 +2899,17 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -2975,8 +2932,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -2999,8 +2955,11 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter '0' for success", @"0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -3097,15 +3056,15 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadMandatoryNonGlobalAttributeStateValue_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3127,8 +3086,7 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadMandatoryNonGlobalAttributeConstraintsStateValue_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBooleanState * cluster = [[CHIPTestBooleanState alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3258,15 +3216,15 @@ class Test_TC_BRAC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3288,8 +3246,7 @@ class Test_TC_BRAC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3307,8 +3264,7 @@ class Test_TC_BRAC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3326,8 +3282,7 @@ class Test_TC_BRAC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3345,8 +3300,7 @@ class Test_TC_BRAC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBridgedActions * cluster = [[CHIPTestBridgedActions alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3517,15 +3471,15 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3547,8 +3501,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3566,8 +3519,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3588,8 +3540,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3611,8 +3562,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3630,15 +3580,17 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3656,8 +3608,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -3675,8 +3626,11 @@ class Test_TC_CC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_9() { - SetIdentity("alpha"); - UserPrompt(@"Please enter '0' for success", @"0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -4733,15 +4687,15 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestValidateConstraintsOfAttributeCurrentHue_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -4766,8 +4720,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValueToMandatoryAttributeCurrentHue_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -4786,8 +4739,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeCurrentHue_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -4812,8 +4764,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeCurrentSaturation_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -4838,8 +4789,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValueToMandatoryAttributeCurrentSaturation_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -4859,8 +4809,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeCurrentSaturation_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -4885,8 +4834,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeCurrentX_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -4911,8 +4859,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValueToMandatoryAttributeCurrentX_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -4931,8 +4878,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeCurrentX_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -4957,8 +4903,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeCurrentY_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -4983,8 +4928,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeCurrentY_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5003,8 +4947,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeCurrentY_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5029,8 +4972,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeColorTemperatureMireds_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5055,8 +4997,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeColorMode_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5081,8 +5022,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeOptions_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5100,8 +5040,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeOptions_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5121,8 +5060,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeOptions_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5144,8 +5082,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeEnhancedCurrentHue_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5163,8 +5100,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeEnhancedCurrentHue_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5184,8 +5120,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeEnhancedCurrentHue_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5203,8 +5138,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeEnhancedColorMode_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5222,8 +5156,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopActive_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5241,8 +5174,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopActive_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5261,8 +5193,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopActive_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5280,8 +5211,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopDirection_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5299,8 +5229,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopDirection_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5320,8 +5249,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopDirection_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5339,8 +5267,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopTime_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5358,8 +5285,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopTime_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5378,8 +5304,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopTime_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5397,8 +5322,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopStartEnhancedHue_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5417,8 +5341,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopStartEnhancedHue_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5439,8 +5362,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopStartEnhancedHue_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5459,8 +5381,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeColorLoopStoredEnhancedHue_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5479,8 +5400,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorLoopStoredEnhancedHue_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5501,8 +5421,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeColorLoopStoredEnhancedHue_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5521,8 +5440,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeColorCapabilities_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5547,8 +5465,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorCapabilities_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5568,8 +5485,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeColorCapabilities_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5594,8 +5510,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeColorTempPhysicalMinMireds_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5620,8 +5535,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorTempPhysicalMinMireds_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5642,8 +5556,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeColorTempPhysicalMinMireds_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5668,8 +5581,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeColorTempPhysicalMaxMireds_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5694,8 +5606,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeColorTempPhysicalMaxMireds_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5716,8 +5627,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeColorTempPhysicalMaxMireds_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5742,8 +5652,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCoupleColorTempToLevelMinMireds_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5767,8 +5676,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeCoupleColorTempToLevelMinMireds_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5795,8 +5703,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackOptionalAttributeCoupleColorTempToLevelMinMireds_48() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5820,8 +5727,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeStartUpColorTemperatureMireds_49() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5853,8 +5759,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeStartUpColorTemperatureMireds_50() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5881,8 +5786,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackOptionalAttributeStartUpColorTemperatureMireds_51() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5910,8 +5814,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRemainingTime_52() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5934,8 +5837,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeRemainingTime_53() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5959,8 +5861,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackOptionalAttributeRemainingTime_54() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -5983,8 +5884,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeDriftCompensation_55() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6014,8 +5914,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeDriftCompensation_56() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6040,8 +5939,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackOptionalAttributeDriftCompensation_57() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6071,8 +5969,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeCompensationText_58() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6096,8 +5993,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToOptionalAttributeCompensationText_59() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6122,8 +6018,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackOptionalAttributeCompensationText_60() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6147,8 +6042,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeNumberOfPrimaries_61() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6173,8 +6067,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributeNumberOfPrimaries_62() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6193,8 +6086,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributeNumberOfPrimaries_63() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6219,8 +6111,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary1X_64() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6245,8 +6136,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1X_65() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6265,8 +6155,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1X_66() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6291,8 +6180,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary1Y_67() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6317,8 +6205,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary1Y_68() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6337,8 +6224,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary1Y_69() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6363,8 +6249,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary1Intensity_70() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6382,8 +6267,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary2X_71() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6408,8 +6292,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2X_72() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6428,8 +6311,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2X_73() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6454,8 +6336,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary2Y_74() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6480,8 +6361,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary2Y_75() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6500,8 +6380,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary2Y_76() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6526,8 +6405,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributePrimary2Intensity_77() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6545,8 +6423,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary3X_78() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6571,8 +6448,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3X_79() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6591,8 +6467,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3X_80() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6617,8 +6492,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary3Y_81() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6643,8 +6517,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary3Y_82() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6663,8 +6536,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary3Y_83() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6689,8 +6561,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary3Intensity_84() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6708,8 +6579,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary4X_85() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6734,8 +6604,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4X_86() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6754,8 +6623,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4X_87() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6780,8 +6648,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary4Y_88() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6806,8 +6673,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary4Y_89() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6826,8 +6692,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary4Y_90() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6852,8 +6717,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary4Intensity_91() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6871,8 +6735,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary5X_92() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6897,8 +6760,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5X_93() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6917,8 +6779,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5X_94() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6943,8 +6804,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary5Y_95() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6969,8 +6829,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary5Y_96() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -6989,8 +6848,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary5Y_97() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7015,8 +6873,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary5Intensity_98() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7034,8 +6891,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary6X_99() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7060,8 +6916,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6X_100() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7080,8 +6935,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6X_101() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7106,8 +6960,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary6Y_102() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7132,8 +6985,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultMandatoryAttributePrimary6Y_103() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7152,8 +7004,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheMandatoryAttributePrimary6Y_104() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7178,8 +7029,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributePrimary6Intensity_105() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7197,8 +7047,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeWhitePointX_106() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7228,8 +7077,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointX_107() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7254,8 +7102,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointX_108() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7282,8 +7129,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeWhitePointY_109() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7313,8 +7159,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeWhitePointY_110() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7339,8 +7184,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeWhitePointY_111() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7367,8 +7211,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorPointRX_112() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7398,8 +7241,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRX_113() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7424,8 +7266,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRX_114() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7452,8 +7293,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorPointRY_115() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7483,8 +7323,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRY_116() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7509,8 +7348,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRY_117() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7537,8 +7375,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorPointRIntensity_118() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7561,8 +7398,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointRIntensity_119() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7587,8 +7423,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeColorPointRIntensity_120() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7615,8 +7450,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorPointGX_121() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7646,8 +7480,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGX_122() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7672,8 +7505,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGX_123() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7700,8 +7532,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorPointGY_124() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7731,8 +7562,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGY_125() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7757,8 +7587,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGY_126() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7785,8 +7614,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorPointGIntensity_127() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7809,8 +7637,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointGIntensity_128() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7835,8 +7662,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeColorPointGIntensity_129() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7863,8 +7689,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorPointBX_130() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7894,8 +7719,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBX_131() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7920,8 +7744,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBX_132() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7948,8 +7771,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorPointBY_133() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -7979,8 +7801,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBY_134() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8005,8 +7826,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBY_135() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8033,8 +7853,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeColorPointBIntensity_136() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8057,8 +7876,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultOptionalAttributeColorPointBIntensity_137() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8083,8 +7901,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadBackTheOptionalAttributeColorPointBIntensity_138() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8431,15 +8248,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8456,8 +8273,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8479,8 +8295,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentHueAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8505,8 +8320,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestMoveToHueShortestDistanceCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8530,15 +8344,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait290ms_5() { - SetIdentity("alpha"); - WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8563,15 +8377,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait295ms_7() { - SetIdentity("alpha"); - WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8596,15 +8410,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait300ms_9() { - SetIdentity("alpha"); - WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8629,8 +8443,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestMoveToHueLongestDistanceCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8654,15 +8467,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait290ms_12() { - SetIdentity("alpha"); - WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8687,15 +8500,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait295ms_14() { - SetIdentity("alpha"); - WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8720,15 +8533,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait300ms_16() { - SetIdentity("alpha"); - WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8753,8 +8566,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestMoveToHueUpCommand_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8778,15 +8590,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait290ms_19() { - SetIdentity("alpha"); - WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8811,15 +8623,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait295ms_21() { - SetIdentity("alpha"); - WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8844,15 +8656,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait300ms_23() { - SetIdentity("alpha"); - WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8877,8 +8689,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestMoveToHueDownCommand_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8902,15 +8713,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait290ms_26() { - SetIdentity("alpha"); - WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8935,15 +8746,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait295ms_28() { - SetIdentity("alpha"); - WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -8968,15 +8779,15 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestWait300ms_30() { - SetIdentity("alpha"); - WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9001,8 +8812,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9019,8 +8829,7 @@ class Test_TC_CC_3_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9362,15 +9171,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9387,8 +9196,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9410,8 +9218,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentHueAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9436,8 +9243,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestMoveHueUpCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9460,15 +9266,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait140ms_5() { - SetIdentity("alpha"); - WaitForMs(140); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 140UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9493,15 +9299,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait145ms_7() { - SetIdentity("alpha"); - WaitForMs(145); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 145UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9526,15 +9332,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait150ms_9() { - SetIdentity("alpha"); - WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9559,8 +9365,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestMoveHueStopCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9583,15 +9388,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait140ms_12() { - SetIdentity("alpha"); - WaitForMs(140); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 140UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9616,15 +9421,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait145ms_14() { - SetIdentity("alpha"); - WaitForMs(145); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 145UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9649,15 +9454,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait150ms_16() { - SetIdentity("alpha"); - WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9682,8 +9487,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestMoveHueDownCommand_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9706,15 +9510,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait140ms_19() { - SetIdentity("alpha"); - WaitForMs(140); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 140UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9739,15 +9543,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait145ms_21() { - SetIdentity("alpha"); - WaitForMs(145); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 145UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9772,15 +9576,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait150ms_23() { - SetIdentity("alpha"); - WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9805,8 +9609,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestMoveHueStopCommand_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9829,15 +9632,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait140ms_26() { - SetIdentity("alpha"); - WaitForMs(140); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 140UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9862,15 +9665,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait145ms_28() { - SetIdentity("alpha"); - WaitForMs(145); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 145UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9895,15 +9698,15 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestWait150ms_30() { - SetIdentity("alpha"); - WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9928,8 +9731,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -9946,8 +9748,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10123,15 +9924,15 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10148,8 +9949,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10171,8 +9971,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentHueAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10197,8 +9996,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestStepHueUpCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10222,15 +10020,15 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestWait25ms_5() { - SetIdentity("alpha"); - WaitForMs(25); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 25UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestOverTransitionTimeReadCurrentHueAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10255,8 +10053,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestStepHueDownCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10280,15 +10077,15 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestWait25ms_8() { - SetIdentity("alpha"); - WaitForMs(25); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 25UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestOverTransitionTimeReadCurrentHueAttributeFromDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10313,8 +10110,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10331,8 +10127,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10518,15 +10313,15 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10543,8 +10338,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10566,8 +10360,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestCheckSaturationAttributeValueMatchedBeforeAnyChange_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10592,8 +10385,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestMoveToSaturationCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10616,15 +10408,15 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestWait6ms_5() { - SetIdentity("alpha"); - WaitForMs(6); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 6UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10649,15 +10441,15 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestWait8ms_7() { - SetIdentity("alpha"); - WaitForMs(8); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 8UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10682,15 +10474,15 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestWait10ms_9() { - SetIdentity("alpha"); - WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10715,8 +10507,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -10733,8 +10524,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11181,15 +10971,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11206,8 +10996,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11229,8 +11018,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11255,8 +11043,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestMoveSaturationUpCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11279,15 +11066,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait40ms_5() { - SetIdentity("alpha"); - WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11312,15 +11099,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait45ms_7() { - SetIdentity("alpha"); - WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11345,15 +11132,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait50ms_9() { - SetIdentity("alpha"); - WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11378,8 +11165,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestMoveSaturationDownCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11402,15 +11188,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait40ms_12() { - SetIdentity("alpha"); - WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11435,15 +11221,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait45ms_14() { - SetIdentity("alpha"); - WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11468,15 +11254,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait50ms_16() { - SetIdentity("alpha"); - WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11501,8 +11287,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestMoveSaturationUpCommand_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11525,15 +11310,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait40ms_19() { - SetIdentity("alpha"); - WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11558,15 +11343,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait45ms_21() { - SetIdentity("alpha"); - WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11591,15 +11376,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait50ms_23() { - SetIdentity("alpha"); - WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11624,8 +11409,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestMoveSaturationStopCommand_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11648,15 +11432,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait40ms_26() { - SetIdentity("alpha"); - WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11681,15 +11465,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait45ms_28() { - SetIdentity("alpha"); - WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11714,15 +11498,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait50ms_30() { - SetIdentity("alpha"); - WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11747,8 +11531,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestMoveSaturationDownCommand_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11771,15 +11554,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait40ms_33() { - SetIdentity("alpha"); - WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11804,15 +11587,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait45ms_35() { - SetIdentity("alpha"); - WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11837,15 +11620,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait50ms_37() { - SetIdentity("alpha"); - WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11870,8 +11653,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestMoveSaturationStopCommand_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11894,15 +11676,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait40ms_40() { - SetIdentity("alpha"); - WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11927,15 +11709,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait45ms_42() { - SetIdentity("alpha"); - WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11960,15 +11742,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestWait50ms_44() { - SetIdentity("alpha"); - WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -11993,8 +11775,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12011,8 +11792,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12188,15 +11968,15 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12213,8 +11993,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12236,8 +12015,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentSaturationAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12262,8 +12040,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestStepSaturationUpCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12287,15 +12064,15 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestWait10ms_5() { - SetIdentity("alpha"); - WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestOverTransitionTimeReadCurrentSaturationAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12320,8 +12097,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestStepSaturationDownCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12345,15 +12121,15 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestWait10ms_8() { - SetIdentity("alpha"); - WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestOverTransitionTimeReadsCurrentSaturationAttributeFromDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12378,8 +12154,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12396,8 +12171,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12568,15 +12342,15 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12593,8 +12367,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12616,8 +12389,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedBeforeAnyChange_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12642,8 +12414,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestCheckSaturationAttributeValueMatchedBeforeAnyChange_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12668,8 +12439,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestMoveToCurrentHueAndSaturationCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12693,15 +12463,15 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestWait10ms_6() { - SetIdentity("alpha"); - WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12726,8 +12496,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12752,8 +12521,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12770,8 +12538,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12942,15 +12709,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12967,8 +12734,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -12990,8 +12756,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentXAttributeValueMatchedBeforeAnyChange_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13016,8 +12781,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentYAttributeValueMatchedBeforeAnyChange_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13042,8 +12806,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestMoveToColorCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13067,15 +12830,15 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestWait20ms_6() { - SetIdentity("alpha"); - WaitForMs(20); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 20UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13100,8 +12863,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13126,8 +12888,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13144,8 +12905,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13339,15 +13099,15 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13364,8 +13124,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13387,8 +13146,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentXAttributeValueMatchedBeforeAnyChange_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13413,8 +13171,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentYAttributeValueMatchedBeforeAnyChange_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13439,8 +13196,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestMoveColorCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13463,15 +13219,15 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestWait150ms_6() { - SetIdentity("alpha"); - WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13496,8 +13252,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13522,8 +13277,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestStopMoveStepCommand_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13544,8 +13298,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13570,8 +13323,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13596,8 +13348,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13614,8 +13365,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13786,15 +13536,15 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13811,8 +13561,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13834,8 +13583,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentXAttributeValueMatchedBeforeAnyChange_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13860,8 +13608,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentYAttributeValueMatchedBeforeAnyChange_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13886,8 +13633,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestStepColorCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13911,15 +13657,15 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestWait50ms_6() { - SetIdentity("alpha"); - WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13944,8 +13690,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13970,8 +13715,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -13988,8 +13732,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14144,15 +13887,15 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14169,8 +13912,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14192,8 +13934,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestReadCurrentColorTemprature_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14218,8 +13959,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestMoveToColorTemperatureCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14242,15 +13982,15 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestWait10ms_5() { - SetIdentity("alpha"); - WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTemprature_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14275,8 +14015,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14293,8 +14032,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14638,15 +14376,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14663,8 +14401,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14686,8 +14423,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestReadCurrentColorTemprature_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14712,8 +14448,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestMoveUpColorTemperatureCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14738,15 +14473,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait90ms_5() { - SetIdentity("alpha"); - WaitForMs(90); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 90UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14771,15 +14506,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait95ms_7() { - SetIdentity("alpha"); - WaitForMs(95); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 95UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14804,15 +14539,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait100ms_9() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14837,8 +14572,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestMoveDownColorTemperatureCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14863,15 +14597,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait190ms_12() { - SetIdentity("alpha"); - WaitForMs(190); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 190UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14896,15 +14630,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait195ms_14() { - SetIdentity("alpha"); - WaitForMs(195); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 195UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14929,15 +14663,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait200ms_16() { - SetIdentity("alpha"); - WaitForMs(200); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 200UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14962,8 +14696,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestMoveUpColorTemperatureCommand_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -14988,8 +14721,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestStopColorTemperatureCommand_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15014,15 +14746,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait90ms_20() { - SetIdentity("alpha"); - WaitForMs(90); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 90UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15047,15 +14779,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait95ms_22() { - SetIdentity("alpha"); - WaitForMs(95); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 95UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15080,15 +14812,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait100ms_24() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15113,8 +14845,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestMoveDownColorTemperatureCommand_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15139,8 +14870,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestStopColorTemperatureCommand_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15165,15 +14895,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait140ms_28() { - SetIdentity("alpha"); - WaitForMs(140); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 140UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15198,15 +14928,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait145ms_30() { - SetIdentity("alpha"); - WaitForMs(145); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 145UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15231,15 +14961,15 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestWait150ms_32() { - SetIdentity("alpha"); - WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15264,8 +14994,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15282,8 +15011,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15515,15 +15243,15 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15540,8 +15268,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15563,8 +15290,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestReadCurrentColorTemprature_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15589,8 +15315,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestStepUpColorTemperatureCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15616,15 +15341,15 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestWait40ms_5() { - SetIdentity("alpha"); - WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTemprature_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15649,15 +15374,15 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestWait45ms_7() { - SetIdentity("alpha"); - WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTemprature_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15682,15 +15407,15 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestWait50ms_9() { - SetIdentity("alpha"); - WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTemprature_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15715,8 +15440,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestStepDownColorTemperatureCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15742,15 +15466,15 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestWait40ms_12() { - SetIdentity("alpha"); - WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTemprature_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15775,15 +15499,15 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestWait45ms_14() { - SetIdentity("alpha"); - WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTemprature_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15808,15 +15532,15 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestWait50ms_16() { - SetIdentity("alpha"); - WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentColorTemprature_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15841,8 +15565,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -15859,8 +15582,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16210,15 +15932,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16235,8 +15957,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16258,8 +15979,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveToHueCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16283,8 +16003,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16309,8 +16028,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveToHueCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16334,15 +16052,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait290ms_6() { - SetIdentity("alpha"); - WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16367,15 +16085,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait295ms_8() { - SetIdentity("alpha"); - WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16400,15 +16118,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait300ms_10() { - SetIdentity("alpha"); - WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16433,8 +16151,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveToHueCommand_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16458,15 +16175,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait290ms_13() { - SetIdentity("alpha"); - WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16491,15 +16208,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait295ms_15() { - SetIdentity("alpha"); - WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16524,15 +16241,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait300ms_17() { - SetIdentity("alpha"); - WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16557,8 +16274,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveToHueCommand_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16582,15 +16298,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait290ms_20() { - SetIdentity("alpha"); - WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16615,15 +16331,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait295ms_22() { - SetIdentity("alpha"); - WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16648,15 +16364,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait300ms_24() { - SetIdentity("alpha"); - WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16681,8 +16397,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveToHueCommand_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16706,15 +16421,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait290ms_27() { - SetIdentity("alpha"); - WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16739,15 +16454,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait295ms_29() { - SetIdentity("alpha"); - WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16772,15 +16487,15 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestWait300ms_31() { - SetIdentity("alpha"); - WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16805,8 +16520,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -16823,8 +16537,7 @@ class Test_TC_CC_7_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17092,15 +16805,15 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17117,8 +16830,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17140,8 +16852,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestCheckEnhancedCurrentHueAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17166,8 +16877,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveHueUpCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17190,15 +16900,15 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestWait290ms_5() { - SetIdentity("alpha"); - WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17223,15 +16933,15 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestWait295ms_7() { - SetIdentity("alpha"); - WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17256,15 +16966,15 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestWait300ms_9() { - SetIdentity("alpha"); - WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17289,8 +16999,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveHueStopCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17313,8 +17022,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17339,8 +17047,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveHueDownCommand_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17363,15 +17070,15 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestWait40ms_14() { - SetIdentity("alpha"); - WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17396,15 +17103,15 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestWait45ms_16() { - SetIdentity("alpha"); - WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17429,15 +17136,15 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestWait50ms_18() { - SetIdentity("alpha"); - WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17462,8 +17169,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveHueStopCommand_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17486,8 +17192,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17512,8 +17217,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17530,8 +17234,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17707,15 +17410,15 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17732,8 +17435,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17755,8 +17457,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestReadsEnhancedCurrentHueAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17781,8 +17482,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestEnhancedStepHueUpCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17806,15 +17506,15 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestWait10ms_5() { - SetIdentity("alpha"); - WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17839,8 +17539,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestEnhancedStepHueDownCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17864,15 +17563,15 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestWait10ms_8() { - SetIdentity("alpha"); - WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17897,8 +17596,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -17915,8 +17613,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18072,15 +17769,15 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18097,8 +17794,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18120,8 +17816,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestReadsEnhancedCurrentHueAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18146,8 +17841,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveToHueAndSaturationCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18171,15 +17865,15 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestWait10ms_5() { - SetIdentity("alpha"); - WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18204,8 +17898,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18222,8 +17915,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18588,15 +18280,15 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18613,8 +18305,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18636,8 +18327,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestMoveHueUpCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18660,8 +18350,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentHueAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18686,8 +18375,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestStopMoveStepCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18708,8 +18396,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentHueAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18734,15 +18421,15 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_7() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastAttribute_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18767,8 +18454,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestMoveSaturationUpCommand_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18791,8 +18477,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18817,8 +18502,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestStopMoveStepCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18839,8 +18523,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentSaturationAttributeFromDut_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18865,15 +18548,15 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_13() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastAttribute_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18898,8 +18581,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestMoveColorCommand_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18922,8 +18604,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentXAttributeFromDut_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18948,8 +18629,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentYAttributeFromDut_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18974,8 +18654,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestStopMoveStepCommand_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -18996,8 +18675,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentXAttributeFromDut_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19022,8 +18700,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentYAttributeFromDut_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19048,15 +18725,15 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_21() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastAttribute_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19081,8 +18758,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastAttribute_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19107,8 +18783,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestMoveUpColorTemperatureCommand_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19133,8 +18808,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentColorTempratureFromDut_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19159,8 +18833,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestStopMoveStepCommand_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19181,8 +18854,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentColorTempratureFromDut_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19207,15 +18879,15 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_28() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19240,8 +18912,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveHueUpCommand_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19264,8 +18935,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsEnhancedCurrentHueAttributeValueFromDut_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19290,8 +18960,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestStopMoveStepCommand_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19312,8 +18981,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsEnhancedCurrentHueAttributeValueFromDut_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19338,15 +19006,15 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_34() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastAttribute_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19371,8 +19039,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightThatWeTurnedOn_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -19389,8 +19056,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20052,15 +19718,15 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20077,8 +19743,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20100,8 +19765,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20127,8 +19791,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20150,8 +19813,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20177,8 +19839,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20200,8 +19861,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20227,8 +19887,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20250,8 +19909,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20277,8 +19935,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20301,8 +19958,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20328,8 +19984,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20352,8 +20007,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20375,8 +20029,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20399,8 +20052,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20426,8 +20078,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20450,8 +20101,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20474,8 +20124,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20497,8 +20146,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20524,8 +20172,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20547,8 +20194,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20574,8 +20220,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20598,8 +20243,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20621,8 +20265,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20645,8 +20288,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20672,8 +20314,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20696,8 +20337,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20720,8 +20360,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20743,8 +20382,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestEnhancedMoveToHueCommand_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20768,15 +20406,15 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestWait2000ms_30() { - SetIdentity("alpha"); - WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20798,8 +20436,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20825,8 +20462,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20848,8 +20484,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20875,8 +20510,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20899,8 +20533,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20922,8 +20555,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20946,8 +20578,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20973,8 +20604,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -20997,8 +20627,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21021,8 +20650,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21044,8 +20672,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21071,8 +20698,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21094,8 +20720,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21121,8 +20746,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21145,8 +20769,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21168,8 +20791,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21192,8 +20814,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_48() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21219,8 +20840,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_49() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21243,8 +20863,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_50() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21267,8 +20886,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_51() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21290,8 +20908,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightForColorControlTests_52() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21308,8 +20925,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_53() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21601,15 +21217,15 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21626,8 +21242,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21649,8 +21264,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21676,8 +21290,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21699,8 +21312,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21722,8 +21334,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21745,8 +21356,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21770,8 +21380,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21793,8 +21402,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21820,8 +21428,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21843,8 +21450,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21867,8 +21473,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestColorLoopSetCommandStartColorLoop_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21894,8 +21499,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21917,8 +21521,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestColorLoopSetCommandStartColorLoop_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21944,8 +21547,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21968,8 +21570,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -21992,8 +21593,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22015,8 +21615,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightForColorControlTests_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22033,8 +21632,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22326,15 +21924,15 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22351,8 +21949,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22374,8 +21971,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22401,8 +21997,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22424,8 +22019,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22447,8 +22041,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22470,8 +22063,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22494,8 +22086,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22521,8 +22112,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22545,8 +22135,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22568,8 +22157,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22592,8 +22180,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestColorLoopSetCommandStartColorLoop_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22619,8 +22206,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22642,8 +22228,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestColorLoopSetCommandStartColorLoop_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22669,8 +22254,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22693,8 +22277,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22717,8 +22300,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22740,8 +22322,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestTurnOffLightForColorControlTests_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22758,8 +22339,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -22999,15 +22579,15 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestQueryDataModelRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23025,8 +22605,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryVendorName_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23045,8 +22624,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryVendorID_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23064,8 +22642,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryProductName_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23084,8 +22661,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryProductID_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23103,8 +22679,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryNodeLabel_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23123,8 +22698,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryUserLocation_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23144,8 +22718,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryHardwareVersion_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23163,8 +22736,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryHardwareVersionString_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23184,8 +22756,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQuerySoftwareVersion_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23203,8 +22774,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQuerySoftwareVersionString_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23225,8 +22795,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryManufacturingDate_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23252,8 +22821,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryPartNumber_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23277,8 +22845,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryProductURL_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23303,8 +22870,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryProductLabel_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23328,8 +22894,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQuerySerialNumber_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23353,8 +22918,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryLocalConfigDisabled_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23377,8 +22941,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryReachable_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23401,8 +22964,7 @@ class Test_TC_DM_1_1 : public TestCommandBridge { CHIP_ERROR TestQueryUniqueID_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -23517,15 +23079,15 @@ class Test_TC_DM_3_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestQueryMaxNetworks_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestNetworkCommissioning * cluster = [[CHIPTestNetworkCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -23550,8 +23112,7 @@ class Test_TC_DM_3_1 : public TestCommandBridge { CHIP_ERROR TestQueryNetworks_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestNetworkCommissioning * cluster = [[CHIPTestNetworkCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -23681,15 +23242,15 @@ class Test_TC_DM_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestQueryFabricsList_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -23719,8 +23280,7 @@ class Test_TC_DM_2_2 : public TestCommandBridge { CHIP_ERROR TestQuerySupportedFabrics_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -23745,8 +23305,7 @@ class Test_TC_DM_2_2 : public TestCommandBridge { CHIP_ERROR TestQueryCommissionedFabrics_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -23771,8 +23330,7 @@ class Test_TC_DM_2_2 : public TestCommandBridge { CHIP_ERROR TestQueryUserTrustedRootCertificates_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -23905,15 +23463,15 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -23937,8 +23495,7 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -23958,8 +23515,7 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -23982,8 +23538,7 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24007,8 +23562,7 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -24168,15 +23722,15 @@ class Test_TC_ETHDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadPHYRateAttributeConstraints_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -24203,8 +23757,7 @@ class Test_TC_ETHDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFullDuplexAttributeConstraints_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -24224,8 +23777,7 @@ class Test_TC_ETHDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadPacketRxCountAttributeConstraints_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -24245,8 +23797,7 @@ class Test_TC_ETHDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadPacketTxCountAttributeConstraints_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -24266,8 +23817,7 @@ class Test_TC_ETHDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTxErrCountAttributeConstraints_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -24287,8 +23837,7 @@ class Test_TC_ETHDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadCollisionCountAttributeConstraints_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -24308,8 +23857,7 @@ class Test_TC_ETHDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadOverrunCountAttributeConstraints_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -24329,8 +23877,7 @@ class Test_TC_ETHDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadCarrierDetectAttributeConstraints_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -24350,8 +23897,7 @@ class Test_TC_ETHDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTimeSinceResetAttributeConstraints_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -24448,8 +23994,9 @@ class Test_TC_ETHDIAG_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -24608,15 +24155,15 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -24638,8 +24185,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -24657,8 +24203,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -24679,8 +24224,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -24702,8 +24246,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -24721,15 +24264,17 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -24747,8 +24292,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -24766,8 +24310,11 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_9() { - SetIdentity("alpha"); - UserPrompt(@"Please enter '0' for success", @"0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -24941,15 +24488,15 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -24967,8 +24514,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -24986,8 +24532,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25005,8 +24550,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMeasuredValue_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25025,8 +24569,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25045,8 +24588,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25065,8 +24607,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25084,8 +24625,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25103,8 +24643,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25122,8 +24661,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeTolerance_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25150,8 +24688,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeTolerance_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25181,8 +24718,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeTolerance_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25206,8 +24742,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeTolerance_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25325,15 +24860,15 @@ class Test_TC_FLW_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25351,8 +24886,7 @@ class Test_TC_FLW_2_2 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25482,15 +25016,15 @@ class Test_TC_GC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -25514,8 +25048,7 @@ class Test_TC_GC_1_1 : public TestCommandBridge { CHIP_ERROR TestTh1WritesTheBreadCrumbAttributeAs1ToTheDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -25537,8 +25070,7 @@ class Test_TC_GC_1_1 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -25562,8 +25094,7 @@ class Test_TC_GC_1_1 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsTheRegulatoryConfigAttributeFromTheDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -25589,8 +25120,7 @@ class Test_TC_GC_1_1 : public TestCommandBridge { CHIP_ERROR TestTh1ReadsTheLocationCapabilityAttributeFromTheDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -25754,15 +25284,15 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25784,8 +25314,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25803,8 +25332,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25833,8 +25361,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25860,8 +25387,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -25885,15 +25411,21 @@ class Test_TC_I_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter '0' for success", @"0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -25990,15 +25522,15 @@ class Test_TC_I_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheIdentifyTimeAttributeFromTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26016,8 +25548,7 @@ class Test_TC_I_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheIdentifyTypeAttributeFromTheDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26281,16 +25812,16 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR Test1WaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x00Default_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26313,16 +25844,16 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestManuallyCheckDutExecutesABlinkEffect_2() { - SetIdentity("alpha"); - UserPrompt(@"DUT executes a blink effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a blink effectgarbage: not in length on purpose", 27); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26345,16 +25876,16 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestCheckDutExecutesABreatheEffect_4() { - SetIdentity("alpha"); - UserPrompt(@"DUT executes a breathe effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x02OkayAndTheEffectVariantFieldSetTo0x00Default_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26377,16 +25908,16 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestCheckDutExecutesAnOkayEffect_6() { - SetIdentity("alpha"); - UserPrompt(@"DUT executes an okay effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes an okay effectgarbage: not in length on purpose", 27); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x0bChannelChangeAndTheEffectVariantFieldSetTo0x00Default_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26409,16 +25940,16 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestCheckDutExecutesAChannelChangeEffect_8() { - SetIdentity("alpha"); - UserPrompt(@"DUT executes a channel change effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a channel change effectgarbage: not in length on purpose", 36); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26441,16 +25972,16 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestCheckDutExecutesABreatheEffect_10() { - SetIdentity("alpha"); - UserPrompt(@"DUT executes a breathe effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xfeFinishEffectAndTheEffectVariantFieldSetTo0x00Default_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26473,16 +26004,17 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestManuallyCheckDutStopsTheBreatheEffectAfterTheCurrentEffectSequence_12() { - SetIdentity("alpha"); - UserPrompt(@"DUT stops the breathe effect after the current effect sequence"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "DUT stops the breathe effect after the current effect sequencegarbage: not in length on purpose", 62); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26505,16 +26037,16 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestManuallyCheckDutExecutesABreatheEffect_14() { - SetIdentity("alpha"); - UserPrompt(@"DUT executes a breathe effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26537,16 +26069,17 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestCheckDutStopsTheBreatheEffectAsSoonAsPossible_16() { - SetIdentity("alpha"); - UserPrompt(@"DUT stops the breathe effect as soon as possible"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("DUT stops the breathe effect as soon as possiblegarbage: not in length on purpose", 48); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x42Unknown_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26569,16 +26102,16 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestCheckDutExecutesABlinkEffect_18() { - SetIdentity("alpha"); - UserPrompt(@"DUT executes a blink effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a blink effectgarbage: not in length on purpose", 27); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -26601,8 +26134,10 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR TestCheckDutStopsAnyEffectThatMayBeStillRunningAsSoonAsPossible_20() { - SetIdentity("alpha"); - UserPrompt(@"DUT stops any effect that may be still running as soon as possible"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "DUT stops any effect that may be still running as soon as possiblegarbage: not in length on purpose", 66); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -26746,15 +26281,15 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26778,8 +26313,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26799,8 +26333,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26834,15 +26367,17 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26867,8 +26402,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26893,8 +26427,11 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter '0' for success", @"0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -27005,15 +26542,15 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27040,8 +26577,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27068,8 +26604,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsToleranceAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27096,8 +26631,7 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { CHIP_ERROR TestThReadsLightSensorTypeAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -27246,15 +26780,15 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27276,8 +26810,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27295,8 +26828,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27333,15 +26865,17 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27372,8 +26906,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27577,15 +27110,15 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestResetLevelTo254_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27608,15 +27141,15 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_2() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsTheCurrentLevelAttribute_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27639,8 +27172,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheRemainingTimeAttribute_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27663,8 +27195,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMinLevelAttribute_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27687,8 +27218,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMaxLevelAttribute_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27706,8 +27236,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27730,8 +27259,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMinFrequencyAttribute_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27754,8 +27282,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMaxFrequencyAttribute_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27778,8 +27305,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27802,8 +27328,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnLevelAttribute_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27821,8 +27346,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27840,8 +27364,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27859,8 +27382,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -27878,8 +27400,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheOptionsAttribute_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28084,15 +27605,15 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28115,8 +27636,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28136,8 +27656,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28160,8 +27679,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesDefaultValueOfOnOffTransitionTimeAttribute_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28181,8 +27699,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheOnLevelAttributeOnTheDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28202,8 +27719,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28227,8 +27743,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheOnTransitionTimeAttributeOnTheDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28248,8 +27763,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28273,8 +27787,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheOffTransitionTimeAttributeOnTheDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28294,8 +27807,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28319,8 +27831,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28344,8 +27855,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheDefaultMoveRateAttributeOnTheDut_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28365,8 +27875,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28390,8 +27899,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28411,8 +27919,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28618,15 +28125,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28644,8 +28151,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMinLevelAttribute_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28663,8 +28169,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheMaxLevelAttribute_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28682,8 +28187,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestSendsAMoveToLevelCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28706,15 +28210,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_5() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28736,8 +28240,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestSendsAMoveToLevelCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28760,15 +28263,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestWait11000Second_8() { - SetIdentity("alpha"); - WaitForMs(11000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 11000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28790,8 +28293,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestReadsOnOffTransitionTimeAttributeFromDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28809,8 +28311,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestSendsAMoveToLevelCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28833,15 +28334,15 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestWait1000ms_12() { - SetIdentity("alpha"); - WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28863,8 +28364,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestResetLevelTo254_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -28887,8 +28387,9 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_15() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } }; @@ -29090,16 +28591,16 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } NSNumber * _Nonnull MaxlevelValue; CHIP_ERROR TestReadsMaxLevelAttributeFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29121,8 +28622,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestSendsAMoveUpCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29145,23 +28645,26 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestUserPromptMessage_3() { - SetIdentity("alpha"); - UserPrompt(@"Physically verify that the DUT moves at a rate of 32 units per second or as close as possible to this rate " - @"and completes moving to its maximum level"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Physically verify that the DUT moves at a rate of 32 units per second or as close as possible to this rate and " + "completes moving to its maximum levelgarbage: not in length on purpose", + 148); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWait3000ms_4() { - SetIdentity("alpha"); - WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29184,8 +28687,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestReadsMinLevelAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29207,8 +28709,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestSendsAMoveDownCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29231,23 +28732,26 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestUserPromptMessage_8() { - SetIdentity("alpha"); - UserPrompt(@"Physically verify that the DUT moves at a rate of 64 units per second or as close as possible to this rate " - @"and complete moving to its minimum level"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Physically verify that the DUT moves at a rate of 64 units per second or as close as possible to this rate and " + "complete moving to its minimum levelgarbage: not in length on purpose", + 147); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWait5000ms_9() { - SetIdentity("alpha"); - WaitForMs(5000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29277,8 +28781,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29300,8 +28803,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29324,15 +28826,15 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_13() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29353,16 +28855,17 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestUserPromptMessage_15() { - SetIdentity("alpha"); - UserPrompt( - @"Physically verify that the device moves at the rate recorded in step 3a and completes moving to its maximum level."); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Physically verify that the device moves at the rate recorded in step 3a and " + "completes moving to its maximum level.garbage: not in length on purpose", + 114); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestResetLevelTo254_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29385,8 +28888,9 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_17() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } }; @@ -29560,15 +29064,15 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendingOnCommand_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29585,8 +29089,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionDutLevelIsSetToItsLowestPoint_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29610,16 +29113,16 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestWait3000ms_3() { - SetIdentity("alpha"); - WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } NSNumber * _Nonnull CurrentlevelValue; CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29641,8 +29144,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestSendsStepUpCommandToDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29666,15 +29168,15 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestWait5000ms_6() { - SetIdentity("alpha"); - WaitForMs(5000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29695,8 +29197,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestSendsAStepDownCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29720,15 +29221,15 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestWait4000ms_9() { - SetIdentity("alpha"); - WaitForMs(4000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 4000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29750,8 +29251,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestResetLevelTo254_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29774,15 +29274,15 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_12() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendingOffCommand_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29953,15 +29453,15 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendingOnCommand_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -29978,8 +29478,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestPreconditionSetDutToLowestPoint_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30002,16 +29501,16 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_3() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } NSNumber * _Nonnull CurrentLevelValue; CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30038,8 +29537,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestSendsAMoveUpCommandToDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30062,15 +29560,15 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestWait2000ms_6() { - SetIdentity("alpha"); - WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendsStopCommandToDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30091,8 +29589,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30113,8 +29610,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestResetLevelTo254_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30137,15 +29633,15 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR TestWait100ms_10() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendingOffCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30293,15 +29789,15 @@ class Test_TC_MC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30324,8 +29820,7 @@ class Test_TC_MC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30352,15 +29847,17 @@ class Test_TC_MC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30384,8 +29881,7 @@ class Test_TC_MC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30409,8 +29905,11 @@ class Test_TC_MC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesEitherValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_6() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -30561,15 +30060,15 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30591,8 +30090,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30610,8 +30108,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30639,15 +30136,17 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30671,8 +30170,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -30696,8 +30194,11 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -30853,15 +30354,15 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -30885,8 +30386,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -30906,8 +30406,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -30939,15 +30438,17 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -30975,8 +30476,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -31003,8 +30503,11 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestReadAttributeFeatureMapAndVerifyThatDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheApplicationPlatformFeaturePicsApSIsTrue_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -31152,15 +30655,15 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31182,8 +30685,7 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31201,8 +30703,7 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31232,15 +30733,17 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31267,8 +30770,7 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31292,8 +30794,11 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR TestReadAttributeFeatureMapAndVerifyThatTheDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheNameUpdatesFeaturePicsNuSIsTrue_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -31440,15 +30945,15 @@ class Test_TC_MC_1_5 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31470,8 +30975,7 @@ class Test_TC_MC_1_5 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31489,8 +30993,7 @@ class Test_TC_MC_1_5 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31519,15 +31022,17 @@ class Test_TC_MC_1_5 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31550,8 +31055,7 @@ class Test_TC_MC_1_5 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31574,8 +31078,11 @@ class Test_TC_MC_1_5 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -31732,15 +31239,15 @@ class Test_TC_MC_1_6 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31762,8 +31269,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31781,8 +31287,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31813,15 +31318,17 @@ class Test_TC_MC_1_6 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31839,8 +31346,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -31859,8 +31365,11 @@ class Test_TC_MC_1_6 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsChannelListsPicsClSIsTrueBit1SetTo1IfTheDutSupportsLineupInfoPicsLiSIsTrue_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -32004,15 +31513,15 @@ class Test_TC_MC_1_7 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32034,8 +31543,7 @@ class Test_TC_MC_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32053,8 +31561,7 @@ class Test_TC_MC_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32089,8 +31596,7 @@ class Test_TC_MC_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32124,8 +31630,7 @@ class Test_TC_MC_1_7 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32150,8 +31655,11 @@ class Test_TC_MC_1_7 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsAdvancedSeekPicsAdvancedseekIsTrueBit1SetTo1IfTheDutSupportsVariableSpeedPicsVariablespeedIsTrue_6() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -32307,15 +31815,15 @@ class Test_TC_MC_1_8 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32337,8 +31845,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32356,8 +31863,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32387,15 +31893,17 @@ class Test_TC_MC_1_8 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32419,8 +31927,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32445,8 +31952,11 @@ class Test_TC_MC_1_8 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutHasBit1SetTo1IfTheDeviceSupportsNameUpdatesPicsNameupdatesIsTrue_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -32598,15 +32108,15 @@ class Test_TC_MC_1_9 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32628,8 +32138,7 @@ class Test_TC_MC_1_9 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32647,8 +32156,7 @@ class Test_TC_MC_1_9 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32677,15 +32185,17 @@ class Test_TC_MC_1_9 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32709,8 +32219,7 @@ class Test_TC_MC_1_9 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -32735,8 +32244,11 @@ class Test_TC_MC_1_9 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyResponseHasTheValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -32892,15 +32404,15 @@ class Test_TC_MC_1_10 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32924,8 +32436,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32945,8 +32456,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -32983,15 +32493,17 @@ class Test_TC_MC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -33018,8 +32530,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -33046,8 +32557,11 @@ class Test_TC_MC_1_10 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyResponseHasTheValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -33204,15 +32718,15 @@ class Test_TC_MC_1_11 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33234,8 +32748,7 @@ class Test_TC_MC_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33253,8 +32766,7 @@ class Test_TC_MC_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33283,15 +32795,17 @@ class Test_TC_MC_1_11 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33315,8 +32829,7 @@ class Test_TC_MC_1_11 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33341,8 +32854,11 @@ class Test_TC_MC_1_11 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsContentSearchPicsContentsearchIsTrueBit1SetTo1IfTheDutSupportsUrlPlaybackPicsUrlplaybackIsTrue_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -33493,15 +33009,15 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33523,8 +33039,7 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33542,8 +33057,7 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33570,15 +33084,17 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33604,8 +33120,7 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33629,8 +33144,11 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -33720,15 +33238,15 @@ class Test_TC_MC_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestPutTheDeviceIntoLowPowerMode_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -33987,15 +33505,15 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendSelect_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34015,8 +33533,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendUp_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34036,8 +33553,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendDown_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34057,8 +33573,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendLeft_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34078,8 +33593,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendRight_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34099,8 +33613,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendRightUp_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34120,8 +33633,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendRightDown_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34141,8 +33653,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendLeftUp_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34162,8 +33673,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendLeftDown_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34183,8 +33693,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendRootMenu_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34204,8 +33713,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendSetupMenu_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34225,8 +33733,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendContentsMenu_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34246,8 +33753,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendFavoriteMenu_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34267,8 +33773,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendExit_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34288,8 +33793,7 @@ class Test_TC_MC_3_1 : public TestCommandBridge { CHIP_ERROR TestSendInvalid_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34407,15 +33911,15 @@ class Test_TC_MC_3_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendRootMenu_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34435,8 +33939,7 @@ class Test_TC_MC_3_2 : public TestCommandBridge { CHIP_ERROR TestSendSetupMenu_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34632,15 +34135,15 @@ class Test_TC_MC_3_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendNumbers1_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34660,8 +34163,7 @@ class Test_TC_MC_3_3 : public TestCommandBridge { CHIP_ERROR TestSendNumbers2_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34681,8 +34183,7 @@ class Test_TC_MC_3_3 : public TestCommandBridge { CHIP_ERROR TestSendNumbers3_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34702,8 +34203,7 @@ class Test_TC_MC_3_3 : public TestCommandBridge { CHIP_ERROR TestSendNumbers4_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34723,8 +34223,7 @@ class Test_TC_MC_3_3 : public TestCommandBridge { CHIP_ERROR TestSendNumbers5_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34744,8 +34243,7 @@ class Test_TC_MC_3_3 : public TestCommandBridge { CHIP_ERROR TestSendNumbers6_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34765,8 +34263,7 @@ class Test_TC_MC_3_3 : public TestCommandBridge { CHIP_ERROR TestSendNumbers7_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34786,8 +34283,7 @@ class Test_TC_MC_3_3 : public TestCommandBridge { CHIP_ERROR TestSendNumbers8_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -34807,8 +34303,7 @@ class Test_TC_MC_3_3 : public TestCommandBridge { CHIP_ERROR TestSendNumbers9_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35015,15 +34510,15 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendRootMenu_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35043,8 +34538,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR TestSendRootMenu_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35064,8 +34558,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR TestSendRootMenu_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35085,8 +34578,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR TestSendRootMenu_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35106,8 +34598,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR TestSendRootMenu_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35127,8 +34618,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR TestSendRootMenu_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35148,8 +34638,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR TestSendRootMenu_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35169,8 +34658,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR TestSendRootMenu_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35190,8 +34678,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR TestSendRootMenu_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35211,8 +34698,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR TestSendRootMenu_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -35316,15 +34802,15 @@ class Test_TC_MC_3_5 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCatalogListAttribute_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -35421,8 +34907,9 @@ class Test_TC_MC_3_6 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -35505,8 +34992,9 @@ class Test_TC_MC_3_7 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -35589,8 +35077,9 @@ class Test_TC_MC_3_8 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -35673,8 +35162,9 @@ class Test_TC_MC_3_9 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -35757,8 +35247,9 @@ class Test_TC_MC_3_10 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -35841,8 +35332,9 @@ class Test_TC_MC_3_11 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -35932,15 +35424,15 @@ class Test_TC_MC_5_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -36042,15 +35534,18 @@ class Test_TC_MC_5_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_1() { - SetIdentity("alpha"); - UserPrompt(@"verify that the channel has changed on the device."); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("verify that the channel has changed on the device.garbage: not in length on purpose", 50); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -36140,15 +35635,18 @@ class Test_TC_MC_5_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_1() { - SetIdentity("alpha"); - UserPrompt(@"verify that the channel has changed on the device"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("verify that the channel has changed on the devicegarbage: not in length on purpose", 49); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -36266,29 +35764,31 @@ class Test_TC_MC_6_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_1() { - SetIdentity("alpha"); - UserPrompt(@"Verify that media is paused"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_2() { - SetIdentity("alpha"); - UserPrompt(@"Physically verify that the media is playing"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Physically verify that the media is playinggarbage: not in length on purpose", 43); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsThePlaybackStateAttribute_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -36310,15 +35810,17 @@ class Test_TC_MC_6_1 : public TestCommandBridge { CHIP_ERROR TestLogACommand_4() { - SetIdentity("alpha"); - UserPrompt(@"Physically verify that the media is paused"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Physically verify that the media is pausedgarbage: not in length on purpose", 42); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_5() { - SetIdentity("alpha"); - UserPrompt(@"Physically verify that the media is stoped"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Physically verify that the media is stopedgarbage: not in length on purpose", 42); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -36457,29 +35959,31 @@ class Test_TC_MC_6_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_1() { - SetIdentity("alpha"); - UserPrompt(@"Verify that media is paused"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_2() { - SetIdentity("alpha"); - UserPrompt(@"Physically verify that the media is playing"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Physically verify that the media is playinggarbage: not in length on purpose", 43); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsTheCurrentStateAttribute_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -36501,36 +36005,46 @@ class Test_TC_MC_6_2 : public TestCommandBridge { CHIP_ERROR TestLogACommand_4() { - SetIdentity("alpha"); - UserPrompt(@"Physically verify that the media is started over"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Physically verify that the media is started overgarbage: not in length on purpose", 48); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_5() { - SetIdentity("alpha"); - UserPrompt(@"Verify that the next media item in the queue has been loaded"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Verify that the next media item in the queue has been loadedgarbage: not in length on purpose", 60); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_6() { - SetIdentity("alpha"); - UserPrompt(@"Verify that the previous media item in the queue has been loaded"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Verify that the previous media item in the queue has been loadedgarbage: not in length on purpose", 64); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_7() { - SetIdentity("alpha"); - UserPrompt(@"Verify that the media has skipped forward 10 seconds"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Verify that the media has skipped forward 10 secondsgarbage: not in length on purpose", 52); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_8() { - SetIdentity("alpha"); - UserPrompt(@"Verify that the media has skipped backward 10 seconds"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Verify that the media has skipped backward 10 secondsgarbage: not in length on purpose", 53); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -36634,29 +36148,35 @@ class Test_TC_MC_6_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_1() { - SetIdentity("alpha"); - UserPrompt(@"Verify that media is paused"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_2() { - SetIdentity("alpha"); - UserPrompt(@"Verify that the media has moved to 10 seconds from the starting point."); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Verify that the media has moved to 10 seconds from the starting point.garbage: not in length on purpose", 70); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_3() { - SetIdentity("alpha"); - UserPrompt(@"User prompt needed to enter the value beyond the furthest valid position"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "User prompt needed to enter the value beyond the furthest valid positiongarbage: not in length on purpose", 72); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -36802,22 +36322,23 @@ class Test_TC_MC_6_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_1() { - SetIdentity("alpha"); - UserPrompt(@"Verify that media is paused"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsThePlaybackSpeedAttributeFromTheDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -36839,15 +36360,15 @@ class Test_TC_MC_6_4 : public TestCommandBridge { CHIP_ERROR TestLogACommand_3() { - SetIdentity("alpha"); - UserPrompt(@"Verify that the media is playing"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Verify that the media is playinggarbage: not in length on purpose", 32); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsTheCurrentStateAttribute_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -36869,22 +36390,25 @@ class Test_TC_MC_6_4 : public TestCommandBridge { CHIP_ERROR TestLogACommand_5() { - SetIdentity("alpha"); - UserPrompt(@"Verify that the media play speed has increased"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Verify that the media play speed has increasedgarbage: not in length on purpose", 46); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_6() { - SetIdentity("alpha"); - UserPrompt(@"Verify that the media play has reversed direction"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Verify that the media play has reversed directiongarbage: not in length on purpose", 49); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsTheCurrentStateAttribute_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -36906,15 +36430,19 @@ class Test_TC_MC_6_4 : public TestCommandBridge { CHIP_ERROR TestLogACommand_8() { - SetIdentity("alpha"); - UserPrompt(@"Verify that the media play has reversed direction"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Verify that the media play has reversed directiongarbage: not in length on purpose", 49); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogACommand_9() { - SetIdentity("alpha"); - UserPrompt(@"Verify that the media is has resumed playing forward at the default speed"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Verify that the media is has resumed playing forward at the default speedgarbage: not in length on purpose", 73); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -36997,8 +36525,9 @@ class Test_TC_MC_7_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -37081,8 +36610,9 @@ class Test_TC_MC_7_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -37179,15 +36709,15 @@ class Test_TC_MC_8_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -37205,8 +36735,7 @@ class Test_TC_MC_8_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheTargetListAttribute_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -37350,22 +36879,23 @@ class Test_TC_MC_9_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestPrecondition_1() { - SetIdentity("alpha"); - Log(@"DUT has one or more Content Apps available"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("DUT has one or more Content Apps availablegarbage: not in length on purpose", 42); + Log("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsTheVendorNameAttribute_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -37386,8 +36916,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheVendorIDAttribute_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -37407,8 +36936,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheApplicationNameAttribute_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -37429,8 +36957,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheProductIDAttribute_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -37450,8 +36977,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheStatusAttribute_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -37475,8 +37001,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { CHIP_ERROR TestReadsTheApplicationVersionAttribute_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -37588,15 +37113,15 @@ class Test_TC_MC_10_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheAcceptHeaderAttributeFromTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -37614,8 +37139,7 @@ class Test_TC_MC_10_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -37739,15 +37263,15 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -37770,8 +37294,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -37789,8 +37312,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -37808,8 +37330,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38006,29 +37527,31 @@ class Test_TC_MF_1_3 : public TestCommandBridge { CHIP_ERROR TestStopTargetDevice_0() { - SetIdentity("alpha"); - Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + Stop("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() { - SetIdentity("alpha"); - Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + Start("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -38059,8 +37582,7 @@ class Test_TC_MF_1_3 : public TestCommandBridge { CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38082,8 +37604,7 @@ class Test_TC_MF_1_3 : public TestCommandBridge { CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38107,23 +37628,24 @@ class Test_TC_MF_1_3 : public TestCommandBridge { CHIP_ERROR TestCommissionFromBeta_6() { - SetIdentity("beta"); - PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:0000000000I31506010")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); + PairWithQRCode("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() { - SetIdentity("beta"); - WaitForCommissionee(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + WaitForCommissionee("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestQueryFabricsList_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -38153,8 +37675,7 @@ class Test_TC_MF_1_3 : public TestCommandBridge { CHIP_ERROR TestQueryFabricsList_9() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -38186,8 +37707,7 @@ class Test_TC_MF_1_3 : public TestCommandBridge { CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38209,8 +37729,7 @@ class Test_TC_MF_1_3 : public TestCommandBridge { CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38234,8 +37753,7 @@ class Test_TC_MF_1_3 : public TestCommandBridge { CHIP_ERROR TestThCr2WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38257,8 +37775,7 @@ class Test_TC_MF_1_3 : public TestCommandBridge { CHIP_ERROR TestThCr2ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38461,29 +37978,31 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR TestStopTargetDevice_0() { - SetIdentity("alpha"); - Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + Stop("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() { - SetIdentity("alpha"); - Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + Start("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -38505,8 +38024,7 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38528,8 +38046,7 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38548,23 +38065,24 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR TestCommissionFromBeta_6() { - SetIdentity("beta"); - PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() { - SetIdentity("beta"); - WaitForCommissionee(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + WaitForCommissionee("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestQueryFabricsList_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -38594,8 +38112,7 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR TestQueryFabricsList_9() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -38625,8 +38142,7 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38648,8 +38164,7 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38668,8 +38183,7 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38691,8 +38205,7 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -38898,22 +38411,22 @@ class Test_TC_MF_1_5 : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_0() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_1() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -38944,44 +38457,48 @@ class Test_TC_MF_1_5 : public TestCommandBridge { CHIP_ERROR TestWaitForPixitCommWin18010Seconds_3() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForPixitCommWin18010Seconds_4() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForPixitCommWin18010Seconds_5() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForPixitCommWin18010Seconds_6() { - SetIdentity("alpha"); - WaitForMs(28000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 28000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() { - SetIdentity("beta"); - PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39012,8 +38529,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39032,16 +38548,16 @@ class Test_TC_MF_1_5 : public TestCommandBridge { CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_10() { - SetIdentity("beta"); - PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39059,8 +38575,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -39080,8 +38595,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -39103,8 +38617,7 @@ class Test_TC_MF_1_5 : public TestCommandBridge { CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39135,9 +38648,10 @@ class Test_TC_MF_1_5 : public TestCommandBridge { CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_15() { - SetIdentity("gamma"); - PairWithQRCode(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("gamma", value); return CHIP_NO_ERROR; } }; @@ -39352,29 +38866,31 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR TestStopTargetDevice_0() { - SetIdentity("alpha"); - Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + Stop("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() { - SetIdentity("alpha"); - Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + Start("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39396,44 +38912,48 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR TestWaitForPixitCommWin18010_4() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForPixitCommWin18010_5() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForPixitCommWin18010_6() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForPixitCommWin18010_7() { - SetIdentity("alpha"); - WaitForMs(28000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 28000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCommissionFromBeta_8() { - SetIdentity("beta"); - PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39455,8 +38975,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39475,16 +38994,16 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR TestCommissionFromBeta_11() { - SetIdentity("beta"); - PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39502,8 +39021,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -39523,8 +39041,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -39546,8 +39063,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39569,24 +39085,27 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR TestCommissionFromBeta_16() { - SetIdentity("beta"); - PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr2StartsACommissioningProcessOnDutCe_17() { - SetIdentity("beta"); - WaitForCommissionee(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + WaitForCommissionee("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_18() { - SetIdentity("gamma"); - PairWithQRCode(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("gamma", value); return CHIP_NO_ERROR; } }; @@ -39835,22 +39354,22 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_0() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_1() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39872,23 +39391,24 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestCommissionFromGamma_3() { - SetIdentity("gamma"); - PairWithQRCode(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("gamma", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_4() { - SetIdentity("gamma"); - WaitForCommissionee(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + WaitForCommissionee("gamma", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39910,23 +39430,24 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestCommissionFromBeta_6() { - SetIdentity("beta"); - PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() { - SetIdentity("beta"); - WaitForCommissionee(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + WaitForCommissionee("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39948,8 +39469,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -39979,8 +39499,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestThCr1ReadsTheListOfFabricsOnDutCe_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -40014,36 +39533,39 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_11() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_12() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_13() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_14() { - SetIdentity("alpha"); - WaitForMs(18000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 18000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1ReOpensNewCommissioningWindowOnDutCe_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -40074,8 +39596,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestThCr3OpensANewCommissioningWindowOnDutCe_16() { - SetIdentity("gamma"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("gamma"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -40105,8 +39626,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestThCr1ReadsTheListOfFabricsOnDutCe_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -40140,36 +39660,39 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_18() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_19() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_20() { - SetIdentity("alpha"); - WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_21() { - SetIdentity("alpha"); - WaitForMs(18000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 18000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -40200,8 +39723,7 @@ class Test_TC_MF_1_15 : public TestCommandBridge { CHIP_ERROR TestThCr2OpensANewCommissioningWindowOnDutCe_23() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -40383,15 +39905,15 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40415,8 +39937,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40436,8 +39957,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40460,8 +39980,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40485,8 +40004,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40506,15 +40024,17 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40534,8 +40054,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40555,8 +40074,11 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_9() { - SetIdentity("alpha"); - UserPrompt(@"Please enter '0' for success", @"0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -40705,15 +40227,15 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancy_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40740,8 +40262,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40762,8 +40283,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeOccupancy_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40787,8 +40307,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40815,8 +40334,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40839,8 +40357,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorType_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40864,8 +40381,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40893,8 +40409,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -40917,8 +40432,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -41042,16 +40556,16 @@ class Test_TC_OCC_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } NSNumber * _Nonnull OccupancyValue; CHIP_ERROR TestReadsOccupancyAttributeFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -41078,8 +40592,7 @@ class Test_TC_OCC_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsBackOccupancyAttributeFromDutAfterFewSeconds_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -41235,15 +40748,15 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41266,8 +40779,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41295,15 +40807,17 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41332,8 +40846,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41356,8 +40869,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41492,15 +41004,15 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheMandatoryAttributeOnOff_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41518,8 +41030,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestReadLtAttributeGlobalSceneControl_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41542,8 +41053,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestReadLtAttributeOnTime_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41566,8 +41076,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestReadLtAttributeOffWaitTime_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41590,8 +41099,7 @@ class Test_TC_OO_2_1 : public TestCommandBridge { CHIP_ERROR TestReadLtAttributeStartUpOnOff_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41831,15 +41339,15 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendOffCommand_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41856,8 +41364,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41879,8 +41386,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41897,8 +41403,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41920,8 +41425,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41938,8 +41442,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41961,8 +41464,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -41979,8 +41481,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42002,8 +41503,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42020,8 +41520,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42043,8 +41542,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendToggleCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42061,15 +41559,15 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestWait1000ms_12() { - SetIdentity("alpha"); - WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42091,8 +41589,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestSendToggleCommand_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42109,15 +41606,15 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestWait1000ms_15() { - SetIdentity("alpha"); - WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42139,22 +41636,25 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestUserPromptSetOnOffAttributeManuallyToOn_17() { - SetIdentity("alpha"); - UserPrompt(@"Operate on device to set OnOff attribute manually to on"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Operate on device to set OnOff attribute manually to ongarbage: not in length on purpose", 55); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserPromptSetOnOffAttributeManuallyToOff_18() { - SetIdentity("alpha"); - UserPrompt(@"Operate on device to set OnOff attribute manually to off"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Operate on device to set OnOff attribute manually to offgarbage: not in length on purpose", 56); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestResetOffCommand_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42171,8 +41671,7 @@ class Test_TC_OO_2_2 : public TestCommandBridge { CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42765,15 +42264,15 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendOnCommand_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42790,15 +42289,15 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestWait1000ms_2() { - SetIdentity("alpha"); - WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsOnOffAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42820,8 +42319,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42843,8 +42341,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42861,15 +42358,15 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestWait1000ms_6() { - SetIdentity("alpha"); - WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsOnOffAttributeFromDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42891,8 +42388,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42914,8 +42410,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42932,15 +42427,15 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestWait1000ms_10() { - SetIdentity("alpha"); - WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsOnOffAttributeFromDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42962,8 +42457,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -42985,8 +42479,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43008,8 +42501,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43031,8 +42523,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43049,8 +42540,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnOffAttributeFromDut_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43072,8 +42562,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43095,8 +42584,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43118,8 +42606,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43136,8 +42623,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnOffAttributeFromDut_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43159,8 +42645,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43182,8 +42667,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnOffAttributeFromDut_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43205,8 +42689,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43228,8 +42711,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43251,8 +42733,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43269,8 +42750,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43292,8 +42772,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43315,8 +42794,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43333,8 +42811,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnOffAttributeFromDut_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43356,8 +42833,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43379,8 +42855,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnOffAttributeFromDut_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43402,8 +42877,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43425,8 +42899,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestSendOnCommand_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43443,8 +42916,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnOffAttributeFromDut_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43466,8 +42938,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43489,8 +42960,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43512,8 +42982,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43530,8 +42999,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnOffAttributeFromDut_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43553,8 +43021,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43576,8 +43043,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnOffAttributeFromDut_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43599,8 +43065,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43622,8 +43087,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43645,8 +43109,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnOffAttributeFromDut_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43668,8 +43131,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOnTimeAttributeFromDut_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43691,8 +43153,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43714,8 +43175,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { CHIP_ERROR TestSendOffCommand_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -43984,15 +43444,15 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsOnCommandToDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44009,8 +43469,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThWritesAValueOf0ToStartUpOnOffAttributeOfDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44030,8 +43489,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThReadsTheStartUpOnOffAttributeFromTheDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44054,22 +43512,22 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestPowerOffDut_4() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_5() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44091,8 +43549,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThWritesAValueOf1ToStartUpOnOffAttributeOfDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44112,22 +43569,22 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestPowerOffDut_8() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_9() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44149,8 +43606,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThWritesAValueOf2ToStartUpOnOffAttributeOfDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44170,22 +43626,22 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestPowerOffDut_12() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_13() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44207,22 +43663,22 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestPowerOffDut_15() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_16() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44244,8 +43700,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThWritesNullToStartUpOnOffAttributeOfDut_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44265,22 +43720,22 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestPowerOffDut_19() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_20() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44302,8 +43757,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestThSendsOffCommandToDut_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44320,22 +43774,22 @@ class Test_TC_OO_2_4 : public TestCommandBridge { CHIP_ERROR TestPowerOffDut_23() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_24() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheOnOffAttributeFromTheDut_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44493,15 +43947,15 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44523,8 +43977,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44542,8 +43995,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44577,15 +44029,17 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44608,8 +44062,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44632,8 +44085,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44760,15 +44212,15 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTestHarnessClientReadsStatusAttributeFromServerDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44793,8 +44245,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsOrderAttributeFromServerDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44812,8 +44263,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsDescriptionAttributeFromServerDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -44831,8 +44281,7 @@ class Test_TC_PS_2_1 : public TestCommandBridge { CHIP_ERROR TestTestHarnessClientReadsBatChargeLevelFromServerDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSource * cluster = [[CHIPTestPowerSource alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -45019,15 +44468,15 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45051,8 +44500,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45072,8 +44520,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45096,8 +44543,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45121,8 +44567,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalMandatoryAttributeConstraintsAttributeList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45142,29 +44587,41 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAcceptedCommandListAttributeFromTheDutAndVerifyThatTheDutResponse_7() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadGeneratedCommandListAttributeFromTheDutAndVerifyThatTheDutResponse_8() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_9() { - SetIdentity("alpha"); - UserPrompt(@"Please enter '0' for success", @"0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -45310,15 +44767,15 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMeasuredValue_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45338,8 +44795,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeMeasuredValue_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45360,8 +44816,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeMeasuredValue_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45386,8 +44841,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMinMeasuredValue_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45407,8 +44861,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeMinMeasuredValue_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45430,8 +44883,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeMinMeasuredValue_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45456,8 +44908,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeConstraintsMaxMeasuredValue_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45477,8 +44928,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryAttributeMaxMeasuredValue_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45500,8 +44950,7 @@ class Test_TC_PRS_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackMandatoryAttributeMaxMeasuredValue_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPressureMeasurement * cluster = [[CHIPTestPressureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45667,15 +45116,15 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45695,8 +45144,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45719,8 +45167,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45740,8 +45187,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45761,8 +45207,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45782,8 +45227,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45807,8 +45251,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45828,8 +45271,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -45850,8 +45292,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsBackOptionalGlobalAttributeFeatureMap_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46296,15 +45737,15 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46324,8 +45765,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxSpeed_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46345,8 +45785,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxFlow_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46366,8 +45805,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeEffectiveOperationMode_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46387,8 +45825,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeEffectiveControlMode_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46408,8 +45845,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeCapacity_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46429,8 +45865,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxPressure_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46450,8 +45885,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxSpeed_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46471,8 +45905,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxFlow_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46492,8 +45925,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeEffectiveOperationMode_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46513,8 +45945,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeEffectiveControlMode_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46534,8 +45965,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeCapacity_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46555,8 +45985,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstPressure_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46581,8 +46010,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstPressure_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46607,8 +46035,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinCompPressure_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46633,8 +46060,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxCompPressure_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46659,8 +46085,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstSpeed_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46685,8 +46110,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstSpeed_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46711,8 +46135,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstFlow_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46737,8 +46160,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstFlow_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46763,8 +46185,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstTemp_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46793,8 +46214,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstTemp_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46823,8 +46243,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributePumpStatus_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46853,8 +46272,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributePumpStatus_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46879,8 +46297,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeSpeed_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46905,8 +46322,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46936,8 +46352,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46962,8 +46377,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributePower_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -46988,8 +46402,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47019,8 +46432,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47045,8 +46457,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestWriteToTheOptionalAttributeLifetimeEnergyConsumed_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47073,8 +46484,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstPressure_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47099,8 +46509,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstPressure_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47125,8 +46534,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinCompPressure_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47151,8 +46559,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxCompPressure_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47177,8 +46584,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstSpeed_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47203,8 +46609,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstSpeed_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47229,8 +46634,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstFlow_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47255,8 +46659,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstFlow_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47281,8 +46684,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMinConstTemp_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47314,8 +46716,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeMaxConstTemp_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47347,8 +46748,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributePumpStatus_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47377,8 +46777,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributePumpStatus_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47403,8 +46802,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeSpeed_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47429,8 +46827,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47455,8 +46852,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLifetimeRunningHours_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47481,8 +46877,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributePower_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47507,8 +46902,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_48() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47538,8 +46932,7 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeLifetimeEnergyConsumed_49() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47707,15 +47100,15 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWrite1ToTheOperationModeAttributeToDutOperationMode_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47737,8 +47130,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47762,8 +47154,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestWrite2ToTheOperationModeAttributeToDutOperationMode_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47785,8 +47176,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47810,8 +47200,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestWrite3ToTheOperationModeAttributeToDutOperationMode_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -47833,8 +47222,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48089,15 +47477,15 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWrite0ToTheOperationModeAttributeToDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48119,8 +47507,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeEffectiveOperationMode_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48144,8 +47531,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite0ToTheControlModeAttributeToDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48167,8 +47553,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48192,8 +47577,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite1ToTheControlModeAttributeToDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48215,8 +47599,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48240,8 +47623,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite2ToTheControlModeAttributeToDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48263,8 +47645,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48288,8 +47669,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite3ToTheControlModeAttributeToDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48311,8 +47691,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48336,8 +47715,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite5ToTheControlModeAttributeToDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48359,8 +47737,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48384,8 +47761,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestWrite7ToTheControlModeAttributeToDut_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48407,8 +47783,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeEffectiveControlMode_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48593,15 +47968,15 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWrite1ToTheLifetimeRunningHoursAttributeToDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48623,8 +47998,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48649,8 +48023,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite2ToTheLifetimeRunningHoursAttributeToDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48672,8 +48045,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48698,8 +48070,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite3ToTheLifetimeRunningHoursAttributeToDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48721,8 +48092,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeLifetimeRunningHours_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48747,8 +48117,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite1ToTheLifetimeEnergyConsumedAttributeToDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48770,8 +48139,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48796,8 +48164,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite2ToTheLifetimeEnergyConsumedAttributeToDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48819,8 +48186,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48845,8 +48211,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestWrite3ToTheLifetimeEnergyConsumedAttributeToDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48868,8 +48233,7 @@ class Test_TC_PCC_2_4 : public TestCommandBridge { CHIP_ERROR TestReadsTheAttributeLifetimeEnergyConsumed_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPumpConfigurationAndControl * cluster = [[CHIPTestPumpConfigurationAndControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -48999,15 +48363,15 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestCommissionDutToTh_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSourceConfiguration * cluster = [[CHIPTestPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -49031,8 +48395,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSourceConfiguration * cluster = [[CHIPTestPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -49052,8 +48415,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheAcceptedCommandListAttributeFromTheDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSourceConfiguration * cluster = [[CHIPTestPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -49073,8 +48435,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheGeneratedCommandListAttributeFromTheDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestPowerSourceConfiguration * cluster = [[CHIPTestPowerSourceConfiguration alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -49234,23 +48595,26 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadClusterRevisionAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesClusterRevisionAttributeHasTheValue3_1() { - SetIdentity("alpha"); - UserPrompt(@"Enter the Value", @"3"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter the Valuegarbage: not in length on purpose", 15); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("3garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -49278,15 +48642,17 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -49311,8 +48677,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -49337,8 +48702,11 @@ class Test_TC_RH_1_1 : public TestCommandBridge { CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_6() { - SetIdentity("alpha"); - UserPrompt(@"Please enter FeatureMap attribute value", @"0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter FeatureMap attribute valuegarbage: not in length on purpose", 39); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -49453,15 +48821,15 @@ class Test_TC_RH_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsConstraintsOfAttributeMeasuredValue_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -49488,8 +48856,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfAttributeMinMeasuredValue_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -49516,8 +48883,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfAttributeMaxMeasuredValue_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -49544,8 +48910,7 @@ class Test_TC_RH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfAttributeTolerance_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -49683,15 +49048,15 @@ class Test_TC_RH_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsConstraintsOfAttributeMinMeasuredValue_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -49718,8 +49083,7 @@ class Test_TC_RH_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -49746,8 +49110,7 @@ class Test_TC_RH_2_2 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -49886,15 +49249,15 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadNumberOfPositionsAttribute_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -49916,8 +49279,7 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadNumberOfPositionsAttribute_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -49939,8 +49301,7 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadCurrentPositionAttribute_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -49962,8 +49323,7 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadCurrentPositionAttribute_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -49985,8 +49345,7 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadMultiPressMaxAttribute_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -50008,8 +49367,7 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { CHIP_ERROR TestReadMultiPressMaxAttribute_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -50367,29 +49725,31 @@ class Test_TC_SWTCH_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_1() { - SetIdentity("alpha"); - UserPrompt(@"Set up subscription to SwitchLatched event"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Set up subscription to SwitchLatched eventgarbage: not in length on purpose", 42); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_2() { - SetIdentity("alpha"); - UserPrompt(@"Operator sets switch to first position"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator sets switch to first positiongarbage: not in length on purpose", 38); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentPositionAttribute_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -50411,29 +49771,31 @@ class Test_TC_SWTCH_2_2 : public TestCommandBridge { CHIP_ERROR TestUserInteractionNeeded_4() { - SetIdentity("alpha"); - UserPrompt(@"Operator sets switch to second position"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator sets switch to second positiongarbage: not in length on purpose", 39); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_5() { - SetIdentity("alpha"); - UserPrompt(@"Set up subscription to InitialPress event"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Set up subscription to InitialPress eventgarbage: not in length on purpose", 41); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_6() { - SetIdentity("alpha"); - UserPrompt(@"Operator does not operate switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator does not operate switchgarbage: not in length on purpose", 32); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadCurrentPositionAttribute_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSwitch * cluster = [[CHIPTestSwitch alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -50455,211 +49817,251 @@ class Test_TC_SWTCH_2_2 : public TestCommandBridge { CHIP_ERROR TestUserInteractionNeeded_8() { - SetIdentity("alpha"); - UserPrompt(@"Operator sets switch to second position"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator sets switch to second positiongarbage: not in length on purpose", 39); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_9() { - SetIdentity("alpha"); - UserPrompt(@"Operator does not operate switch (release switch)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Operator does not operate switch (release switch)garbage: not in length on purpose", 49); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_10() { - SetIdentity("alpha"); - UserPrompt(@"Set up subscription to InitialPress and ShortRelease events"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Set up subscription to InitialPress and ShortRelease eventsgarbage: not in length on purpose", 59); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_11() { - SetIdentity("alpha"); - UserPrompt(@"Operator does not operate switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator does not operate switchgarbage: not in length on purpose", 32); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_12() { - SetIdentity("alpha"); - UserPrompt(@"Operator operates switch (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch (press briefly)garbage: not in length on purpose", 40); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_13() { - SetIdentity("alpha"); - UserPrompt(@"Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_14() { - SetIdentity("alpha"); - UserPrompt(@"Operator operates switch for 5 seconds"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch for 5 secondsgarbage: not in length on purpose", 38); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWait3000ms_15() { - SetIdentity("alpha"); - WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_16() { - SetIdentity("alpha"); - UserPrompt(@"Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_17() { - SetIdentity("alpha"); - UserPrompt(@"Set up subscription to InitialPress, LongPress, ShortRelease, LongRelease events"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Set up subscription to InitialPress, LongPress, ShortRelease, LongRelease eventsgarbage: not in length on purpose", + 80); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_18() { - SetIdentity("alpha"); - UserPrompt(@"Operator does not operate switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator does not operate switchgarbage: not in length on purpose", 32); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_19() { - SetIdentity("alpha"); - UserPrompt(@"Operator operates switch (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch (press briefly)garbage: not in length on purpose", 40); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_20() { - SetIdentity("alpha"); - UserPrompt(@"Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_21() { - SetIdentity("alpha"); - UserPrompt(@"Operator operates switch for 5 seconds"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch for 5 secondsgarbage: not in length on purpose", 38); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWait3000ms_22() { - SetIdentity("alpha"); - WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_23() { - SetIdentity("alpha"); - UserPrompt(@"Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_24() { - SetIdentity("alpha"); - UserPrompt(@"Set up subscription to InitialPress, ShortRelease, MultiPressOngoing, MultiPressComplete events"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Set up subscription to InitialPress, ShortRelease, MultiPressOngoing, " + "MultiPressComplete eventsgarbage: not in length on purpose", + 95); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_25() { - SetIdentity("alpha"); - UserPrompt(@"Operator does not operate switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator does not operate switchgarbage: not in length on purpose", 32); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_26() { - SetIdentity("alpha"); - UserPrompt(@"Operator operates switch (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch (press briefly)garbage: not in length on purpose", 40); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_27() { - SetIdentity("alpha"); - UserPrompt(@"Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_28() { - SetIdentity("alpha"); - UserPrompt(@"Operator operates switch (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch (press briefly)garbage: not in length on purpose", 40); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_29() { - SetIdentity("alpha"); - UserPrompt(@"Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_30() { - SetIdentity("alpha"); - UserPrompt(@"Operator operates switch again (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Operator operates switch again (press briefly)garbage: not in length on purpose", 46); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_31() { - SetIdentity("alpha"); - UserPrompt(@"Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_32() { - SetIdentity("alpha"); - UserPrompt(@"Operator operates switch again (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Operator operates switch again (press briefly)garbage: not in length on purpose", 46); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_33() { - SetIdentity("alpha"); - UserPrompt(@"Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_34() { - SetIdentity("alpha"); - UserPrompt(@"Operator operates switch again (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Operator operates switch again (press briefly)garbage: not in length on purpose", 46); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_35() { - SetIdentity("alpha"); - UserPrompt(@"Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_36() { - SetIdentity("alpha"); - UserPrompt(@"Operator operates switch again (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Operator operates switch again (press briefly)garbage: not in length on purpose", 46); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestUserInteractionNeeded_37() { - SetIdentity("alpha"); - UserPrompt(@"Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -50805,23 +50207,26 @@ class Test_TC_TM_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadClusterRevisionAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesClusterRevisionAttributeHasTheValue4_1() { - SetIdentity("alpha"); - UserPrompt(@"Please enter ClusterRevision attribute value", @"4"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter ClusterRevision attribute valuegarbage: not in length on purpose", 44); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("4garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -50850,23 +50255,32 @@ class Test_TC_TM_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAcceptedCommandListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedCommandsThisListShallIncludeAllTheMandatoryCommands_4() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadGeneratedCommandListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedCommands_5() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -50977,15 +50391,15 @@ class Test_TC_TM_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -51005,8 +50419,7 @@ class Test_TC_TM_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -51033,8 +50446,7 @@ class Test_TC_TM_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -51061,8 +50473,7 @@ class Test_TC_TM_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -51207,15 +50618,15 @@ class Test_TC_TM_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -51242,8 +50653,7 @@ class Test_TC_TM_2_2 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -51270,8 +50680,7 @@ class Test_TC_TM_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsMeasuredValueAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -51291,8 +50700,7 @@ class Test_TC_TM_2_2 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -51410,15 +50818,15 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51436,8 +50844,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51455,8 +50862,7 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalGlobalAttributeConstraintsFeatureMap_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51685,15 +51091,15 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51711,8 +51117,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51737,8 +51142,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51763,8 +51167,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutAbsMinCoolSetpointLimit_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51794,8 +51197,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutAbsMaxCoolSetpointLimit_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51825,8 +51227,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutOccupiedCoolingSetpoint_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51856,8 +51257,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51882,8 +51282,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51908,8 +51307,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51934,8 +51332,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinCoolSetpointLimit_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51965,8 +51362,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMaxCoolSetpointLimit_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -51996,8 +51392,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52023,8 +51418,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52049,8 +51443,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52080,8 +51473,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52111,8 +51503,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52136,8 +51527,7 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52822,15 +52212,15 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsOccupiedCoolingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52866,8 +52256,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForOccupiedCoolingSetpointAttribute_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52894,8 +52283,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedCoolingSetpointAttribute_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52922,8 +52310,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfMinCoolSetpointLimitToOccupiedCoolingSetpointAttribute_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52950,8 +52337,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToOccupiedCoolingSetpointAttribute_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -52978,8 +52364,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsOccupiedHeatingSetpointAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53010,8 +52395,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForOccupiedHeatingSetpointAttribute_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53033,8 +52417,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfOccupiedHeatingSetpointAttribute_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53056,8 +52439,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfMinHeatSetpointLimitToOccupiedHeatingSetpointAttribute_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53079,8 +52461,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfMaxHeatSetpointLimitToOccupiedHeatingSetpointAttribute_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53102,8 +52483,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsMinHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53134,8 +52514,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinHeatSetpointLimitAttribute_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53157,8 +52536,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinHeatSetpointLimitAttribute_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53180,8 +52558,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53203,8 +52580,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53226,8 +52602,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsMaxHeatSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53258,8 +52633,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxHeatSetpointLimitAttribute_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53281,8 +52655,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxHeatSetpointLimitAttribute_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53304,8 +52677,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfAbsMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53327,8 +52699,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfAbsMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53350,8 +52721,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsMinCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53387,8 +52757,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMinCoolSetpointLimitAttribute_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53415,8 +52784,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMinCoolSetpointLimitAttribute_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53443,8 +52811,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53471,8 +52838,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53499,8 +52865,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsMaxCoolSetpointLimitAttributeFromServerDutAndVerifiesThatTheValueIsWithinRange_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53536,8 +52901,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueBackThatIsDifferentButValidForMaxCoolSetpointLimitAttribute_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53564,8 +52928,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsItBackAgainToConfirmTheSuccessfulWriteOfMaxCoolSetpointLimitAttribute_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53592,8 +52955,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfAbsMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53620,8 +52982,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53648,8 +53009,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMinHeatSetpointLimitAttribute_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53671,8 +53031,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMinHeatSetpointLimitAttribute_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53694,8 +53053,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesSetsBackTheLimitOfMinHeatSetpointLimitToMaxHeatSetpointLimitAttribute_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53717,8 +53075,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesSetsBackTheLimitOfMaxHeatSetpointLimitToMaxHeatSetpointLimitAttribute_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53740,8 +53097,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMinCoolSetpointLimitAttribute_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53768,8 +53124,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMinCoolSetpointLimitAttribute_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53796,8 +53151,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesSetsBackTheLimitOfMinCoolSetpointLimitToMaxCoolSetpointLimitAttribute_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53824,8 +53178,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesSetsBackTheLimitOfMaxCoolSetpointLimitToMaxCoolSetpointLimitAttribute_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53852,8 +53205,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadsControlSequenceOfOperationFromServerDutAndVerifiesThatTheValueIsValid_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53884,8 +53236,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCommandForControlSequenceOfOperationWithANewValidValue_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53907,8 +53258,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestReadItBackAgainToConfirmTheSuccessfulWrite_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53931,8 +53281,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53952,8 +53301,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53973,8 +53321,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -53999,8 +53346,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54025,8 +53371,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54051,8 +53396,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54072,8 +53416,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedCoolingSetpointToDefaultValue_48() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54098,8 +53441,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { CHIP_ERROR TestSetsOccupiedHeatingSetpointToDefaultValue_49() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54247,23 +53589,26 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadClusterRevisionAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesClusterRevisionAttributeHasTheValue2_1() { - SetIdentity("alpha"); - UserPrompt(@"Please enter ClusterRevision attribute value", @"2"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter ClusterRevision attribute valuegarbage: not in length on purpose", 44); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("2garbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54290,15 +53635,17 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() { - SetIdentity("alpha"); - UserPrompt(@"Please enter 'y' for success", @"y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54322,8 +53669,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54466,15 +53812,15 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54497,8 +53843,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54524,8 +53869,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54548,8 +53892,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54575,8 +53918,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54600,8 +53942,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54852,15 +54193,15 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWritesAValueOf0ToTemperatureDisplayModeAttributeOfDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54882,8 +54223,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf1ToTemperatureDisplayModeAttributeOfDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54905,8 +54245,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOfGreaterThan1ToTemperatureDisplayModeAttributeOfDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54928,8 +54267,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf0ToKeypadLockoutAttributeOfDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54950,8 +54288,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf1ToKeypadLockoutAttributeOfDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54972,8 +54309,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf2ToKeypadLockoutAttributeOfDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -54994,8 +54330,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf3ToKeypadLockoutAttributeOfDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -55016,8 +54351,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf4ToKeypadLockoutAttributeOfDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -55038,8 +54372,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf5ToKeypadLockoutAttributeOfDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -55060,8 +54393,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOfGreaterThan5ToKeypadLockoutAttributeOfDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -55081,8 +54413,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf0ToScheduleProgrammingVisibilityAttributeOfDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -55105,8 +54436,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOf1ToScheduleProgrammingVisibilityAttributeOfDut_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -55129,8 +54459,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { CHIP_ERROR TestWritesAValueOfGreaterThan1ToScheduleProgrammingVisibilityAttributeOfDut_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -55244,15 +54573,15 @@ class Test_TC_DIAG_TH_NW_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendsResetCountsCommand_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -55271,8 +54600,7 @@ class Test_TC_DIAG_TH_NW_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheOverruncountAttribute_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56081,15 +55409,15 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestValidateConstraintsOfAttributeChannel_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56109,8 +55437,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeNetworkName_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56131,8 +55458,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributePanId_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56152,8 +55478,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeExtendedPanId_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56173,8 +55498,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeOverrunCount_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56194,8 +55518,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadPartitionIdAttributeValue_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56219,8 +55542,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributePartitionId_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56240,8 +55562,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadWeightingAttributeValue_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56265,8 +55586,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeWeighting_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56286,8 +55606,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadDataVersionAttributeValue_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56311,8 +55630,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeDataVersion_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56332,8 +55650,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadStableDataVersionAttributeValue_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56357,8 +55674,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeStableDataVersion_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56378,8 +55694,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadLeaderRouterIdAttributeValue_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56403,8 +55718,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeLeaderRouterId_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56424,8 +55738,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadDetachedRoleCountAttributeValue_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56449,8 +55762,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeDetachedRoleCount_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56470,8 +55782,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadChildRoleCountAttributeValue_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56495,8 +55806,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeChildRoleCount_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56516,8 +55826,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRouterRoleCountAttributeValue_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56541,8 +55850,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRouterRoleCount_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56562,8 +55870,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadLeaderRoleCountAttributeValue_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56587,8 +55894,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeLeaderRoleCount_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56608,8 +55914,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadAttachAttemptCountAttributeValue_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56633,8 +55938,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeAttachAttemptCount_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56654,8 +55958,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadPartitionIdChangeCountAttributeValue_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56679,8 +55982,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributePartitionIdChangeCount_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56700,8 +56002,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadBetterPartitionAttachAttemptCountAttributeValue_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56726,8 +56027,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeBetterPartitionAttachAttemptCount_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56748,8 +56048,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadParentChangeCountAttributeValue_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56773,8 +56072,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeParentChangeCount_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56794,8 +56092,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxTotalCountAttributeValue_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56819,8 +56116,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxTotalCount_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56840,8 +56136,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxUnicastCountAttributeValue_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56865,8 +56160,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxUnicastCount_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56886,8 +56180,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxBroadcastCountAttributeValue_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56911,8 +56204,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxBroadcastCount_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56932,8 +56224,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxNoAckRequestedCountAttributeValue_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56957,8 +56248,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxNoAckRequestedCount_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -56978,8 +56268,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxDataCountAttributeValue_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57003,8 +56292,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxDataCount_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57024,8 +56312,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxDataPollCountAttributeValue_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57049,8 +56336,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxDataPollCount_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57070,8 +56356,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxBeaconCountAttributeValue_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57095,8 +56380,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxBeaconCount_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57116,8 +56400,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxBeaconRequestCountAttributeValue_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57141,8 +56424,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxBeaconRequestCount_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57162,8 +56444,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxOtherCountAttributeValue_48() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57187,8 +56468,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxOtherCount_49() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57208,8 +56488,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxRetryCountAttributeValue_50() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57233,8 +56512,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxRetryCount_51() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57254,8 +56532,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxDirectMaxRetryExpiryCountAttributeValue_52() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57280,8 +56557,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxDirectMaxRetryExpiryCount_53() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57302,8 +56578,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxIndirectMaxRetryExpiryCountAttributeValue_54() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57328,8 +56603,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxIndirectMaxRetryExpiryCount_55() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57350,8 +56624,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxErrCcaCountAttributeValue_56() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57375,8 +56648,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxErrCcaCount_57() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57396,8 +56668,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxErrAbortCountAttributeValue_58() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57421,8 +56692,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxErrAbortCount_59() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57442,8 +56712,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTxErrBusyChannelCountAttributeValue_60() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57467,8 +56736,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeTxErrBusyChannelCount_61() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57488,8 +56756,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxTotalCountAttributeValue_62() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57513,8 +56780,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxTotalCount_63() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57534,8 +56800,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxUnicastCountAttributeValue_64() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57559,8 +56824,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxUnicastCount_65() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57580,8 +56844,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxBroadcastCountAttributeValue_66() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57605,8 +56868,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxBroadcastCount_67() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57626,8 +56888,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxDataCountAttributeValue_68() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57651,8 +56912,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxDataCount_69() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57672,8 +56932,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxDataPollCountAttributeValue_70() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57697,8 +56956,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxDataPollCount_71() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57718,8 +56976,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxBeaconCountAttributeValue_72() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57743,8 +57000,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxBeaconCount_73() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57764,8 +57020,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxBeaconRequestCountAttributeValue_74() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57789,8 +57044,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxBeaconRequestCount_75() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57810,8 +57064,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxOtherCountAttributeValue_76() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57835,8 +57088,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxOtherCount_77() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57856,8 +57108,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxAddressFilteredCountAttributeValue_78() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57881,8 +57132,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxAddressFilteredCount_79() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57902,8 +57152,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxDestAddrFilteredCountAttributeValue_80() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57927,8 +57176,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxDestAddrFilteredCount_81() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57948,8 +57196,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxDuplicatedCountAttributeValue_82() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57973,8 +57220,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxDuplicatedCount_83() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -57994,8 +57240,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxErrNoFrameCountAttributeValue_84() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58019,8 +57264,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxErrNoFrameCount_85() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58040,8 +57284,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxErrUnknownNeighborCountAttributeValue_86() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58066,8 +57309,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxErrUnknownNeighborCount_87() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58088,8 +57330,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxErrInvalidScrAddrCountAttributeValue_88() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58113,8 +57354,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxErrInvalidSrcAddrCount_89() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58134,8 +57374,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxErrSecCountAttributeValue_90() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58159,8 +57398,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxErrInvalidSrcAddrCount_91() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58180,8 +57418,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxErrFcsCountAttributeValue_92() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58205,8 +57442,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxErrFcsCount_93() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58226,8 +57462,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadRxErrOtherCountAttributeValue_94() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58251,8 +57486,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeRxErrOtherCount_95() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58272,8 +57506,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadActiveTimestampAttributeValue_96() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58297,8 +57530,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeActiveTimestamp_97() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58318,8 +57550,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadPendingTimestampAttributeValue_98() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58343,8 +57574,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributePendingTimestamp_99() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58364,8 +57594,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestReadDelayAttributeValue_100() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58389,8 +57618,7 @@ class Test_TC_DIAG_TH_NW_1_2 : public TestCommandBridge { CHIP_ERROR TestValidateConstraintsOfAttributeDelay_101() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestThreadNetworkDiagnostics * cluster = [[CHIPTestThreadNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58494,15 +57722,15 @@ class Test_TC_LC_1_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestTh1ReadsLabelListAttributeFromTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -58638,15 +57866,15 @@ class Test_TC_WIFIDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsNetworkInterfaceStructureAttributeFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58666,8 +57894,7 @@ class Test_TC_WIFIDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsSecurityTypeAttributeFromDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58691,8 +57918,7 @@ class Test_TC_WIFIDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsSecurityTypeAttributeConstraints_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58712,8 +57938,7 @@ class Test_TC_WIFIDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsWiFiVersionAttributeConstraints_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58740,8 +57965,7 @@ class Test_TC_WIFIDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsChannelNumberAttributeConstraints_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58761,8 +57985,7 @@ class Test_TC_WIFIDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsRssiAttributeConstraints_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWiFiNetworkDiagnostics * cluster = [[CHIPTestWiFiNetworkDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -58866,8 +58089,9 @@ class Test_TC_WIFIDIAG_3_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -59001,15 +58225,15 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2ReadTheGlobalAttributeClusterRevision_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59034,8 +58258,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryGlobalAttributeClusterRevision_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59056,8 +58279,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackGlobalAttributeClusterRevision_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59079,8 +58301,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59098,8 +58319,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheGlobalAttributeFeatureMap_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59124,8 +58344,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteTheDefaultValueToOptionalGlobalAttributeFeatureMap_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59144,8 +58363,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackGlobalAttributeFeatureMap_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59649,15 +58867,15 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultType_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59682,8 +58900,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeType_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59702,8 +58919,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeType_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59725,8 +58941,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultConfigStatus_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59751,8 +58966,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeConfigStatus_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59771,8 +58985,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeConfigStatus_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59794,8 +59007,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultOperationalStatus_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59820,8 +59032,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeOperationalStatus_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59841,8 +59052,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeOperationalStatus_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59864,8 +59074,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoMandatoryAttributeDefaultEndProductType_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59890,8 +59099,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoMandatoryAttributeEndProductType_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59910,8 +59118,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoMandatoryAttributeEndProductType_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59933,8 +59140,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRwMandatoryAttributeDefaultMode_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59959,8 +59165,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRwMandatoryAttributeMode_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -59980,8 +59185,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRwMandatoryAttributeMode_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60003,8 +59207,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultTargetPositionLiftPercent100ths_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60032,8 +59235,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionLiftPercent100ths_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60055,8 +59257,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeTargetPositionLiftPercent100ths_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60079,8 +59280,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultTargetPositionTiltPercent100ths_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60108,8 +59308,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeTargetPositionTiltPercent100ths_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60131,8 +59330,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeTargetPositionTiltPercent100ths_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60155,8 +59353,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercent100ths_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60184,8 +59381,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercent100ths_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60207,8 +59403,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercent100ths_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60231,8 +59426,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercent100ths_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60260,8 +59454,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercent100ths_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60283,8 +59476,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercent100ths_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60307,8 +59499,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitLift_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60333,8 +59524,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitLift_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60355,8 +59545,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitLift_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60381,8 +59570,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitLift_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60407,8 +59595,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitLift_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60429,8 +59616,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitLift_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60455,8 +59641,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledOpenLimitTilt_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60481,8 +59666,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledOpenLimitTilt_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60503,8 +59687,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledOpenLimitTilt_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60529,8 +59712,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test2ReadTheRoOptionalAttributeDefaultInstalledClosedLimitTilt_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60555,8 +59737,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3aWriteAValueIntoTheRoOptionalAttributeInstalledClosedLimitTilt_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60577,8 +59758,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test3bReadsBackTheRoOptionalAttributeInstalledClosedLimitTilt_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60603,8 +59783,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test4ReadTheRoMandatoryAttributeDefaultSafetyStatus_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60629,8 +59808,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test5aWriteAValueIntoTheRoMandatoryAttributeSafetyStatus_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60649,8 +59827,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test5bReadsBackTheRoMandatoryAttributeSafetyStatus_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60672,8 +59849,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLift_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60698,8 +59874,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLift_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60720,8 +59895,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionLift_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60746,8 +59920,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTilt_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60772,8 +59945,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTilt_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60794,8 +59966,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionTilt_48() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60820,8 +59991,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionLiftPercentage_49() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60849,8 +60019,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionLiftPercentage_50() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60872,8 +60041,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionLiftPercentage_51() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60896,8 +60064,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test4ReadTheRoOptionalAttributeDefaultCurrentPositionTiltPercentage_52() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60925,8 +60092,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test5aWriteAValueIntoTheRoOptionalAttributeCurrentPositionTiltPercentage_53() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -60948,8 +60114,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { CHIP_ERROR Test5bReadsBackTheRoOptionalAttributeCurrentPositionTiltPercentage_54() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61049,8 +60214,9 @@ class Test_TC_WNCV_2_2 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } }; @@ -61332,15 +60498,15 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1aThSetTheModeAttributeBit0OfTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61360,8 +60526,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test1bThReadsConfigStatusAttributeFromDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61385,8 +60550,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test1cThClearTheModeAttributeBit0OfTheDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61406,8 +60570,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test1dThReadsConfigStatusAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61431,8 +60594,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2aThSetTheModeAttributeBit1OfTheDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61453,8 +60615,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2bThReadsConfigStatusAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61481,8 +60642,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2cIfConfigStatusBit00ThSendDownOrCloseCommandToTheDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61498,8 +60658,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2dThClearTheModeAttributeBit1OfTheDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61519,8 +60678,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2eThReadsConfigStatusAttributeFromDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61544,8 +60702,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2fThReadsTheModeAttributeFromTheDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61569,8 +60726,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test2gThSendDownOrCloseCommandToTheDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61587,8 +60743,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3aThSetTheModeAttributeBit2OfTheDut_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61609,8 +60764,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3cThReadsConfigStatusAttributeFromDut_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61637,8 +60791,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3cThSendDownOrCloseCommandToTheDut_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61654,8 +60807,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3dThClearTheModeAttributeBit2OfTheDut_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61675,8 +60827,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3eThReadsConfigStatusAttributeFromDut_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61700,8 +60851,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3fThReadsTheModeAttributeFromTheDut_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61725,8 +60875,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { CHIP_ERROR Test3gThSendDownOrCloseCommandToTheDut_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61842,15 +60991,15 @@ class Test_TC_WNCV_2_4 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsTypeAttributeFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61872,8 +61021,7 @@ class Test_TC_WNCV_2_4 : public TestCommandBridge { CHIP_ERROR TestReadsTypeAttributeConstraints_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -61997,15 +61145,15 @@ class Test_TC_WNCV_2_5 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsEndProductTypeAttributeFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62027,8 +61175,7 @@ class Test_TC_WNCV_2_5 : public TestCommandBridge { CHIP_ERROR TestReadsEndProductTypeAttributeConstraintsFromDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62357,15 +61504,15 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62382,15 +61529,15 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsFor10SecondsMovementsOnTheDevice_2() { - SetIdentity("alpha"); - WaitForMs(10000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62418,8 +61565,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62447,8 +61593,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62476,8 +61621,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62507,8 +61651,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62527,8 +61670,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62559,8 +61701,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62577,15 +61718,15 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test2bDutUpdatesItsAttributes_10() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62609,15 +61750,15 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test2eThLeaveTheDeviceMovingFor2Seconds_12() { - SetIdentity("alpha"); - WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test3a1VerifyDutReportsOperationalStatusAttributeToThAfterAUpOrOpen_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62642,15 +61783,15 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3a2DutUpdatesItsAttributes_14() { - SetIdentity("alpha"); - WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62678,8 +61819,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62707,8 +61847,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62736,8 +61875,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62765,8 +61903,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test4aThSendsAStopMotionCommandToDut_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62783,15 +61920,15 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_20() { - SetIdentity("alpha"); - WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62813,15 +61950,15 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_22() { - SetIdentity("alpha"); - WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -62849,8 +61986,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { CHIP_ERROR Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63182,15 +62318,15 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63207,15 +62343,15 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsFor10SecondsMovementsOnTheDevice_2() { - SetIdentity("alpha"); - WaitForMs(10000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63243,8 +62379,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test1dIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63272,8 +62407,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test1eIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63301,8 +62435,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test1fIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63332,8 +62465,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63352,8 +62484,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63384,8 +62515,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63402,15 +62532,15 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test2bDutUpdatesItsAttributes_10() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63434,15 +62564,15 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test2eThLeaveTheDeviceMovingFor2Seconds_12() { - SetIdentity("alpha"); - WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test3aVerifyDutReportsOperationalStatusAttributeToThAfterADownOrClose_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63467,15 +62597,15 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3a2DutUpdatesItsAttributes_14() { - SetIdentity("alpha"); - WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63503,8 +62633,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3cIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63532,8 +62661,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63561,8 +62689,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test3eIfPaLfThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63590,8 +62717,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test4aThSendsAStopMotionCommandToDut_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63608,15 +62734,15 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test4bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_20() { - SetIdentity("alpha"); - WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test4cVerifyDutUpdateOperationalStatusAttributeToThAfterAStopMotion_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63638,15 +62764,15 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test5aThWaitsForXSecondsAttributesUpdateOnTheDevice_22() { - SetIdentity("alpha"); - WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test5bIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63674,8 +62800,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { CHIP_ERROR Test5cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63911,15 +63036,15 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63936,15 +63061,15 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsFor68SecondsMovementsOnTheDevice_2() { - SetIdentity("alpha"); - WaitForMs(6000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 6000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1cThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63961,8 +63086,9 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test1dThWaitsFor2SecondsMovementsOnTheDevice_4() { - SetIdentity("alpha"); - WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } bool testSendClusterTest_TC_WNCV_3_3_5_WaitForReport_Fulfilled = false; @@ -63970,8 +63096,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR TestReport2SubscribeToDutReportsOnOperationalStatusAttribute_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -63990,8 +63115,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test2SubscribeToDutReportsOnOperationalStatusAttribute_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64022,8 +63146,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test2aThSendsAStopMotionCommandToDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64040,15 +63163,15 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test2bThWaitsFor3SecondsTheEndOfInertialMovementsOnTheDevice_8() { - SetIdentity("alpha"); - WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2cVerifyDutReportsOperationalStatusAttributeToThAfterAStopMotion_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64070,15 +63193,15 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test2dThWaitsFor100ms3sAttributesUpdateOnTheDevice_10() { - SetIdentity("alpha"); - WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2eThReadsOperationalStatusAttributeFromDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64101,8 +63224,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64133,8 +63255,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test3bIfPaLfThReadsTargetPositionLiftPercent100thsAttribute3cItMustBeEqualWithCurrentPositionLiftPercent100thsFromDut_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64165,8 +63286,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test4aIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64197,8 +63317,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { CHIP_ERROR Test4bIfPaTlThReadsTargetPositionTiltPercent100thsAttribute4cItMustBeEqualWithCurrentPositionTiltPercent100thsFromDut_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64388,15 +63507,15 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64413,15 +63532,15 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2() { - SetIdentity("alpha"); - WaitForMs(mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64438,15 +63557,15 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4() { - SetIdentity("alpha"); - WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64470,8 +63589,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64495,8 +63613,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64520,8 +63637,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64705,15 +63821,15 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1aThSendsUpOrOpenCommandToPrepositionTheDutInTheOppositeDirection_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64730,15 +63846,15 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsForFastMotionDurationSecondsMovementsOnTheDevice_2() { - SetIdentity("alpha"); - WaitForMs(mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64755,15 +63871,15 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test2bThWaitsForFullMotionDurationSecondsMovementsOnTheDevice_4() { - SetIdentity("alpha"); - WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test3aIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64787,8 +63903,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test3bIfPaLfThReadsCurrentPositionLiftPercentageOptionalAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64812,8 +63927,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test3cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -64837,8 +63951,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { CHIP_ERROR Test3dIfPaTlThReadsCurrentPositionTiltPercentageOptionalAttributeFromDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65044,15 +64157,15 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65069,15 +64182,15 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsForXSecondsMovementsOnTheDut_2() { - SetIdentity("alpha"); - WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1cIfPaLfThReadsCurrentPositionLiftPercent100thsAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65099,8 +64212,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test2aThSendsGoToLiftPercentageCommandWith25PercentToDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65121,15 +64233,15 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test2bDutUpdatesItsAttributes_5() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2cIfPaLfThReadsTargetPositionLiftPercent100thsAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65153,15 +64265,15 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test3aThSetATimeoutOfXMinutesForFailure_7() { - SetIdentity("alpha"); - WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test3bThReadsOperationalStatusAttributeFromDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65183,8 +64295,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test4aThSendsGoToLiftPercentageCommandWith7520PercentToDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65205,22 +64316,23 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { CHIP_ERROR Test4bDutUpdatesItsAttributes_10() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test5aThWaitsForXSecondsMovementsOnTheDut_11() { - SetIdentity("alpha"); - WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test5bThReadsOperationalStatusAttributeFromDut_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65424,15 +64536,15 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1aThSendsDownOrCloseCommandToPrepositionTheDutInTheOppositeDirection_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65449,15 +64561,15 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsForXSecondsMovementsOnTheDut_2() { - SetIdentity("alpha"); - WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1cIfPaTlThReadsCurrentPositionTiltPercent100thsAttributeFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65479,8 +64591,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test2aThSendsGoToTiltPercentageCommandWith30PercentToDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65501,15 +64612,15 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test2bDutUpdatesItsAttributes_5() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2cIfPaTlThReadsTargetPositionTiltPercent100thsAttributeFromDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65533,15 +64644,15 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test3aThSetATimeoutOfXMinutesForFailure_7() { - SetIdentity("alpha"); - WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test3bThReadsOperationalStatusAttributeFromDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65563,8 +64674,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test4aThSendsGoToTiltPercentageCommandWith6020PercentToDut_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65585,22 +64695,23 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { CHIP_ERROR Test4bDutUpdatesItsAttributes_10() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test5aThWaitsForXSecondsMovementsOnTheDut_11() { - SetIdentity("alpha"); - WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test5bThReadsOperationalStatusAttributeFromDut_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65744,16 +64855,16 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } NSNumber * _Nullable attrCurrentPositionLiftPercent100ths; CHIP_ERROR Test1aIfPaLfLfThReadsCurrentPositionLiftPercent100thsFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65783,8 +64894,7 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { CHIP_ERROR Test2bThSendsGoToLiftPercentageCommandWithBadParamToDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65804,8 +64914,7 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { CHIP_ERROR Test3aThSendsGoToLiftPercentageCommandWith10001ToDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65825,8 +64934,7 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { CHIP_ERROR Test4aThSendsGoToLiftPercentageCommandWith0xFFFFToDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -65979,16 +65087,16 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { CHIP_ERROR Test0WaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } NSNumber * _Nullable attrCurrentPositionTiltPercent100ths; CHIP_ERROR Test1aIfPaTlTlThReadsCurrentPositionTiltPercent100thsFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66019,8 +65127,7 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { CHIP_ERROR Test1bIfPaTlTlThReadsCurrentPositionTiltPercentageFromDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66050,8 +65157,7 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { CHIP_ERROR Test2bThSendsGoToTiltPercentageCommandWithBadParamToDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66071,8 +65177,7 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { CHIP_ERROR Test3aThSendsGoToTiltPercentageCommandWith10001ToDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66092,8 +65197,7 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { CHIP_ERROR Test4aThSendsGoToTiltPercentageCommandWith0xFFFFToDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66321,15 +65425,15 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test0aWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test0bThSendsUpOrOpenCommandToPrepositionTheDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66346,8 +65450,7 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test1aIfPaLfLfThSendsGoToLiftPercentageCommandWith90ToDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66368,15 +65471,15 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsFor100ms1s_3() { - SetIdentity("alpha"); - WaitForMs(500); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test1cThSendsStopMotionCommandToDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66393,15 +65496,15 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test1dThWaitsFor100ms1s_5() { - SetIdentity("alpha"); - WaitForMs(500); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2aIfPaTlTlThSendsGoToTiltPercentageCommandWith90ToDut_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66422,15 +65525,15 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test2bThWaitsFor100ms1s_7() { - SetIdentity("alpha"); - WaitForMs(500); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test2cThSendsStopMotionCommandToDut_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66447,16 +65550,16 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test2dThWaitsFor100ms1s_9() { - SetIdentity("alpha"); - WaitForMs(500); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } NSNumber * _Nullable attrCurrentPositionLiftPercent100ths; CHIP_ERROR Test3aThReadsCurrentPositionLiftPercent100thsFromDut_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66482,8 +65585,7 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test3bThReadsCurrentPositionTiltPercent100thsFromDut_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66508,22 +65610,22 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test3cRebootRestartTheDut_12() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test3dWaitForTheCommissionedDeviceToBeRetrieved_13() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR Test3eThReadsCurrentPositionLiftPercent100thsFromDut_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66552,8 +65654,7 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test3fThReadsCurrentPositionTiltPercent100thsFromDut_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWindowCovering * cluster = [[CHIPTestWindowCovering alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66680,15 +65781,15 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeTargetNavigatorList_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66716,8 +65817,7 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeCurrentNavigatorTarget_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66739,8 +65839,7 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { CHIP_ERROR TestNavigateTargetRequestCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66884,15 +65983,15 @@ class TV_AudioOutputCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeAudioOutputList_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:2 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66923,8 +66022,7 @@ class TV_AudioOutputCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeCurrentAudioOutput_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:2 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66946,8 +66044,7 @@ class TV_AudioOutputCluster : public TestCommandBridge { CHIP_ERROR TestSelectOutputCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:2 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66967,8 +66064,7 @@ class TV_AudioOutputCluster : public TestCommandBridge { CHIP_ERROR TestRenameOutputCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:2 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -66989,8 +66085,7 @@ class TV_AudioOutputCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeAudioOutputList_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:2 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -67134,15 +66229,15 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeApplicationLauncherList_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -67168,8 +66263,7 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationLauncherApp_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -67194,8 +66288,7 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { CHIP_ERROR TestLaunchAppCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -67233,8 +66326,7 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { CHIP_ERROR TestStopAppCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -67271,8 +66363,7 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { CHIP_ERROR TestHideAppCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -67393,15 +66484,15 @@ class TV_KeypadInputCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendKeyCommand_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -67524,15 +66615,15 @@ class TV_AccountLoginCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestGetSetupPinCommand_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -67558,8 +66649,7 @@ class TV_AccountLoginCluster : public TestCommandBridge { CHIP_ERROR TestLoginCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -67580,8 +66670,7 @@ class TV_AccountLoginCluster : public TestCommandBridge { CHIP_ERROR TestLogoutCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -67682,15 +66771,15 @@ class TV_WakeOnLanCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadMacAddress_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -67845,15 +66934,15 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeVendorName_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; @@ -67877,8 +66966,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeVendorId_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; @@ -67902,8 +66990,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationName_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; @@ -67927,8 +67014,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeProductId_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; @@ -67952,8 +67038,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationStatus_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; @@ -67977,8 +67062,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationStatus_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; @@ -68006,8 +67090,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationVersion_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; @@ -68031,8 +67114,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeApplicationAllowedVendorList_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; @@ -68282,15 +67364,15 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributePlaybackState_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68312,8 +67394,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeStartTime_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68336,8 +67417,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeDuration_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68360,8 +67440,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributePosition_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68387,8 +67466,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributePlaybackSpeed_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68410,8 +67488,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSeekRangeEnd_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68434,8 +67511,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSeekRangeStart_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68458,8 +67534,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackPlayCommand_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68487,8 +67562,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackPauseCommand_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68516,8 +67590,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackStopCommand_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68545,8 +67618,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackStartOverCommand_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68574,8 +67646,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackPreviousCommand_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68603,8 +67674,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackNextCommand_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68632,8 +67702,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackRewindCommand_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68661,8 +67730,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackFastForwardCommand_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68690,8 +67758,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackSkipForwardCommand_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68722,8 +67789,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributePositionAfterSkipForward_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68749,8 +67815,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackSkipBackwardCommand_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68781,8 +67846,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributePositionAfterSkipBackward_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68808,8 +67872,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestMediaPlaybackSeekCommand_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68839,8 +67902,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributePositionAfterSeek_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -68986,15 +68048,15 @@ class TV_ChannelCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeChannelList_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69045,8 +68107,7 @@ class TV_ChannelCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeChannelLineup_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69076,8 +68137,7 @@ class TV_ChannelCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeCurrentChannel_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69107,8 +68167,7 @@ class TV_ChannelCluster : public TestCommandBridge { CHIP_ERROR TestChangeChannelCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69139,8 +68198,7 @@ class TV_ChannelCluster : public TestCommandBridge { CHIP_ERROR TestChangeChannelByNumberCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69161,8 +68219,7 @@ class TV_ChannelCluster : public TestCommandBridge { CHIP_ERROR TestSkipChannelCommand_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69266,15 +68323,15 @@ class TV_LowPowerCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSleepInputStatusCommand_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69396,15 +68453,15 @@ class TV_ContentLauncherCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeAcceptHeaderList_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69428,8 +68485,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSupportedStreamingProtocols_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69452,8 +68508,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { CHIP_ERROR TestLaunchContentCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69503,8 +68558,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { CHIP_ERROR TestLaunchUrlCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69843,15 +68897,15 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeMediaInputList_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69885,8 +68939,7 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestReadCurrentMediaInput_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69908,8 +68961,7 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestSelectInputCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69929,8 +68981,7 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestHideInputStatusCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69947,8 +68998,7 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestShowInputStatusCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69965,8 +69015,7 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestRenameInputCommand_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -69987,8 +69036,7 @@ class TV_MediaInputCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeMediaInputList_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73565,15 +72613,15 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendTestCommand_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73590,8 +72638,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestNotHandledCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73607,8 +72654,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestSpecificCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73631,8 +72677,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestAddArgumentsCommand_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73659,8 +72704,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendFailingTestAddArgumentsCommand_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73681,8 +72725,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBooleanDefaultValue_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73704,8 +72747,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBooleanTrue_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73725,8 +72767,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBooleanTrue_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73748,8 +72789,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBooleanFalse_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73769,8 +72809,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBooleanFalse_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73792,8 +72831,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap8DefaultValue_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73815,8 +72853,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap8MaxValue_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73836,8 +72873,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap8MaxValue_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73859,8 +72895,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap8MinValue_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73880,8 +72915,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap8MinValue_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73903,8 +72937,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap16DefaultValue_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73926,8 +72959,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap16MaxValue_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73947,8 +72979,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap16MaxValue_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73970,8 +73001,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap16MinValue_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -73991,8 +73021,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap16MinValue_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74014,8 +73043,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32DefaultValue_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74037,8 +73065,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap32MaxValue_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74058,8 +73085,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32MaxValue_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74081,8 +73107,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap32MinValue_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74102,8 +73127,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32MinValue_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74125,8 +73149,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74148,8 +73171,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap64MaxValue_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74169,8 +73191,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap64MaxValue_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74192,8 +73213,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap64MinValue_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74213,8 +73233,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap64MinValue_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74236,8 +73255,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8uDefaultValue_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74259,8 +73277,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8uMaxValue_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74280,8 +73297,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8uMaxValue_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74303,8 +73319,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8uMinValue_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74324,8 +73339,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8uMinValue_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74347,8 +73361,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16uDefaultValue_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74370,8 +73383,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16uMaxValue_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74391,8 +73403,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16uMaxValue_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74414,8 +73425,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16uMinValue_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74435,8 +73445,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16uMinValue_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74458,8 +73467,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uDefaultValue_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74481,8 +73489,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uMaxValue_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74502,8 +73509,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uMaxValue_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74525,8 +73531,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uMinValue_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74546,8 +73551,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uMinValue_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74569,8 +73573,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64uDefaultValue_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74592,8 +73595,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64uMaxValue_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74613,8 +73615,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64uMaxValue_48() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74636,8 +73637,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64uMinValue_49() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74657,8 +73657,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64uMinValue_50() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74680,8 +73679,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8sDefaultValue_51() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74703,8 +73701,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8sMaxValue_52() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74724,8 +73721,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8sMaxValue_53() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74747,8 +73743,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8sMinValue_54() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74768,8 +73763,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8sMinValue_55() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74791,8 +73785,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8sDefaultValue_56() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74812,8 +73805,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8sDefaultValue_57() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74835,8 +73827,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74858,8 +73849,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16sMaxValue_59() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74879,8 +73869,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16sMaxValue_60() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74902,8 +73891,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16sMinValue_61() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74923,8 +73911,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16sMinValue_62() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74946,8 +73933,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16sDefaultValue_63() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74967,8 +73953,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16sDefaultValue_64() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -74990,8 +73975,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32sDefaultValue_65() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75013,8 +73997,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32sMaxValue_66() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75034,8 +74017,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32sMaxValue_67() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75057,8 +74039,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32sMinValue_68() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75078,8 +74059,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32sMinValue_69() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75101,8 +74081,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32sDefaultValue_70() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75122,8 +74101,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32sDefaultValue_71() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75145,8 +74123,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64sDefaultValue_72() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75168,8 +74145,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64sMaxValue_73() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75189,8 +74165,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64sMaxValue_74() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75212,8 +74187,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64sMinValue_75() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75233,8 +74207,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64sMinValue_76() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75256,8 +74229,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64sDefaultValue_77() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75277,8 +74249,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64sDefaultValue_78() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75300,8 +74271,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSingleDefaultValue_79() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75323,8 +74293,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeSingleMediumValue_80() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75344,8 +74313,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSingleMediumValue_81() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75367,8 +74335,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeSingleLargeValue_82() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75388,8 +74355,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSingleLargeValue_83() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75411,8 +74377,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeSingleSmallValue_84() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75432,8 +74397,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSingleSmallValue_85() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75455,8 +74419,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeSingleDefaultValue_86() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75476,8 +74439,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeSingleDefaultValue_87() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75499,8 +74461,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeDoubleDefaultValue_88() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75522,8 +74483,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeDoubleMediumValue_89() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75543,8 +74503,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeDoubleMediumValue_90() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75566,8 +74525,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeDoubleLargeValue_91() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75587,8 +74545,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeDoubleLargeValue_92() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75610,8 +74567,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeDoubleSmallValue_93() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75631,8 +74587,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeDoubleSmallValue_94() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75654,8 +74609,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeDoubleDefaultValue_95() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75675,8 +74629,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeDoubleDefaultValue_96() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75698,8 +74651,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum8DefaultValue_97() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75721,8 +74673,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum8MaxValue_98() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75742,8 +74693,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum8MaxValue_99() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75765,8 +74715,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum8MinValue_100() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75786,8 +74735,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum8MinValue_101() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75809,8 +74757,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum16DefaultValue_102() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75832,8 +74779,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum16MaxValue_103() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75853,8 +74799,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum16MaxValue_104() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75876,8 +74821,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum16MinValue_105() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75897,8 +74841,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum16MinValue_106() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75920,8 +74863,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringDefaultValue_107() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75943,8 +74885,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringWithEmbeddedNull_108() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75964,8 +74905,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringWithEmbeddedNull_109() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -75988,8 +74928,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringWithWeirdChars_110() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76009,8 +74948,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringWithWeirdChars_111() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76033,8 +74971,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetString_112() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76054,8 +74991,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetString_113() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76078,8 +75014,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetString_114() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76098,8 +75033,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetString_115() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76122,8 +75056,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetString_116() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76143,8 +75076,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeLongOctetStringDefaultValue_117() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76166,8 +75098,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeLongOctetString_118() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76191,8 +75122,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeLongOctetString_119() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76220,8 +75150,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeLongOctetString_120() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76241,8 +75170,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringDefaultValue_121() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76264,8 +75192,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharString_122() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76285,8 +75212,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharString_123() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76308,8 +75234,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValueTooLong_124() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76328,8 +75253,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharString_125() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76351,8 +75275,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringEmpty_126() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76372,8 +75295,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeLongCharStringDefaultValue_127() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76395,8 +75317,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeLongCharString_128() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76419,8 +75340,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeLongCharString_129() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76445,8 +75365,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeLongCharString_130() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76466,8 +75385,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeListLongOctetStringForChunkedRead_131() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76525,8 +75443,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeListLongOctetStringForChunkedWrite_132() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76589,8 +75506,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeListLongOctetStringForChunkedRead_133() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76657,8 +75573,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochUsDefaultValue_134() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76680,8 +75595,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochUsMaxValue_135() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76701,8 +75615,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochUsMaxValue_136() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76724,8 +75637,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochUsMinValue_137() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76745,8 +75657,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochUsMinValue_138() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76768,8 +75679,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochSDefaultValue_139() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76791,8 +75701,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochSMaxValue_140() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76812,8 +75721,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochSMaxValue_141() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76835,8 +75743,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochSMinValue_142() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76856,8 +75763,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochSMinValue_143() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76879,8 +75785,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeUnsupported_144() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76907,8 +75812,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteattributeUnsupported_145() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76933,8 +75837,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandToUnsupportedEndpoint_146() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:200 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76950,8 +75853,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandToUnsupportedCluster_147() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76967,8 +75869,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeVendorIdDefaultValue_148() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -76990,8 +75891,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeVendorId_149() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77011,8 +75911,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeVendorId_150() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77034,8 +75933,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestRestoreAttributeVendorId_151() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77055,8 +75953,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_152() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77088,8 +75985,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_153() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77124,8 +76020,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_154() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77160,8 +76055,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithNestedStructArgumentAndArg1cbIsTrue_155() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77207,8 +76101,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithNestedStructArgumentArg1cbIsFalse_156() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77254,8 +76147,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndAllFieldsBOfArg1dAreTrue_157() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77347,8 +76239,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfArg1dAreFalse_158() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77440,8 +76331,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithStructArgumentAndSeeWhatWeGetBack_159() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77486,8 +76376,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_160() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77526,8 +76415,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_161() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77566,8 +76454,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_162() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77615,8 +76502,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_163() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77646,8 +76532,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_164() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77698,8 +76583,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_165() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77750,8 +76634,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithListOfNestedStructListArgumentAndAllFieldsBOfElementsOfArg1dAreTrue_166() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77849,8 +76732,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithNestedStructListArgumentAndSomeFieldsBOfElementsOfArg1dAreFalse_167() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77948,8 +76830,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeListWithListOfInt8uAndNoneOfThemIsSetTo0_168() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -77976,8 +76857,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeListWithListOfInt8u_169() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78003,8 +76883,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeListWithListOfOctetString_170() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78031,8 +76910,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeListWithListOfOctetString_171() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78058,8 +76936,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeListWithListOfListStructOctetString_172() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78102,8 +76979,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeListWithListOfListStructOctetString_173() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78145,8 +77021,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithOptionalArgSet_174() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78189,8 +77064,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_175() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78216,8 +77090,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionals_176() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78248,8 +77121,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteListOfStructsContainingNullablesAndOptionals_177() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78285,8 +77157,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadListOfStructsContainingNullablesAndOptionalsAfterWriting_178() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78324,8 +77195,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBooleanNull_179() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78345,8 +77215,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBooleanNull_180() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78368,8 +77237,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBooleanTrue_181() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78389,8 +77257,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBooleanTrue_182() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78413,8 +77280,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap8MaxValue_183() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78434,8 +77300,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap8MaxValue_184() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78458,8 +77323,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap8InvalidValue_185() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78478,8 +77342,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap8UnchangedValue_186() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78502,8 +77365,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap8NullValue_187() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78523,8 +77385,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap8NullValue_188() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78546,8 +77407,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap16MaxValue_189() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78567,8 +77427,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap16MaxValue_190() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78591,8 +77450,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap16InvalidValue_191() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78611,8 +77469,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap16UnchangedValue_192() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78635,8 +77492,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap16NullValue_193() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78656,8 +77512,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap16NullValue_194() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78679,8 +77534,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap32MaxValue_195() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78700,8 +77554,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap32MaxValue_196() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78724,8 +77577,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap32InvalidValue_197() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78744,8 +77596,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap32UnchangedValue_198() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78768,8 +77619,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap32NullValue_199() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78789,8 +77639,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap32NullValue_200() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78812,8 +77661,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap64MaxValue_201() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78833,8 +77681,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap64MaxValue_202() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78857,8 +77704,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap64InvalidValue_203() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78877,8 +77723,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap64UnchangedValue_204() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78901,8 +77746,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableBitmap64NullValue_205() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78922,8 +77766,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableBitmap64NullValue_206() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78945,8 +77788,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8uMinValue_207() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78966,8 +77808,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uMinValue_208() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -78990,8 +77831,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8uMaxValue_209() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79011,8 +77851,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uMaxValue_210() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79035,8 +77874,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8uInvalidValue_211() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79055,8 +77893,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValue_212() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79079,8 +77916,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uUnchangedValueWithConstraint_213() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79099,8 +77935,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8uNullValue_214() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79120,8 +77955,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uNullValue_215() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79143,8 +77977,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uNullValueRange_216() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79168,8 +78001,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uNullValueNot_217() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79190,8 +78022,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8uValue_218() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79211,8 +78042,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uValueInRange_219() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79236,8 +78066,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8uNotValueOk_220() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79258,8 +78087,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16uMinValue_221() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79279,8 +78107,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uMinValue_222() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79303,8 +78130,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16uMaxValue_223() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79324,8 +78150,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uMaxValue_224() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79348,8 +78173,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16uInvalidValue_225() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79368,8 +78192,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uUnchangedValue_226() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79392,8 +78215,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16uNullValue_227() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79413,8 +78235,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uNullValue_228() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79436,8 +78257,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uNullValueRange_229() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79461,8 +78281,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uNullValueNot_230() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79483,8 +78302,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16uValue_231() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79504,8 +78322,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uValueInRange_232() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79529,8 +78346,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16uNotValueOk_233() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79551,8 +78367,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32uMinValue_234() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79572,8 +78387,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uMinValue_235() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79596,8 +78410,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32uMaxValue_236() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79617,8 +78430,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uMaxValue_237() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79641,8 +78453,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32uInvalidValue_238() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79661,8 +78472,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uUnchangedValue_239() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79685,8 +78495,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32uNullValue_240() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79706,8 +78515,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uNullValue_241() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79729,8 +78537,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uNullValueRange_242() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79754,8 +78561,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uNullValueNot_243() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79776,8 +78582,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32uValue_244() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79797,8 +78602,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uValueInRange_245() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79822,8 +78626,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32uNotValueOk_246() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79844,8 +78647,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64uMinValue_247() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79865,8 +78667,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uMinValue_248() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79889,8 +78690,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64uMaxValue_249() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79910,8 +78710,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uMaxValue_250() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79934,8 +78733,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64uInvalidValue_251() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79954,8 +78752,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uUnchangedValue_252() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79978,8 +78775,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64uNullValue_253() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -79999,8 +78795,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uNullValue_254() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80022,8 +78817,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uNullValueRange_255() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80048,8 +78842,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uNullValueNot_256() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80070,8 +78863,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64uValue_257() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80091,8 +78883,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uValueInRange_258() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80117,8 +78908,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64uNotValueOk_259() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80139,8 +78929,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8sMinValue_260() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80160,8 +78949,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8sMinValue_261() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80184,8 +78972,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8sInvalidValue_262() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80204,8 +78991,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8sUnchangedValue_263() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80228,8 +79014,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8sNullValue_264() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80249,8 +79034,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8sNullValue_265() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80272,8 +79056,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8sNullValueRange_266() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80297,8 +79080,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8sNullValueNot_267() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80319,8 +79101,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt8sValue_268() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80340,8 +79121,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8sValueInRange_269() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80365,8 +79145,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt8sNotValueOk_270() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80387,8 +79166,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16sMinValue_271() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80408,8 +79186,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16sMinValue_272() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80432,8 +79209,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16sInvalidValue_273() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80452,8 +79228,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16sUnchangedValue_274() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80476,8 +79251,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16sNullValue_275() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80497,8 +79271,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16sNullValue_276() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80520,8 +79293,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16sNullValueRange_277() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80545,8 +79317,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16sNullValueNot_278() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80567,8 +79338,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt16sValue_279() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80588,8 +79358,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16sValueInRange_280() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80613,8 +79382,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt16sNotValueOk_281() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80635,8 +79403,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32sMinValue_282() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80656,8 +79423,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32sMinValue_283() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80680,8 +79446,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32sInvalidValue_284() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80700,8 +79465,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32sUnchangedValue_285() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80724,8 +79488,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32sNullValue_286() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80745,8 +79508,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32sNullValue_287() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80768,8 +79530,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32sNullValueRange_288() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80793,8 +79554,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32sNullValueNot_289() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80815,8 +79575,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt32sValue_290() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80836,8 +79595,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32sValueInRange_291() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80861,8 +79619,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt32sNotValueOk_292() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80883,8 +79640,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64sMinValue_293() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80904,8 +79660,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64sMinValue_294() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80928,8 +79683,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64sInvalidValue_295() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80948,8 +79702,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64sUnchangedValue_296() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80972,8 +79725,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64sNullValue_297() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -80993,8 +79745,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64sNullValue_298() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81016,8 +79767,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64sNullValueRange_299() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81041,8 +79791,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64sNullValueNot_300() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81063,8 +79812,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableInt64sValue_301() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81084,8 +79832,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64sValueInRange_302() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81109,8 +79856,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableInt64sNotValueOk_303() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81131,8 +79877,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSingleMediumValue_304() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81152,8 +79897,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSingleMediumValue_305() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81176,8 +79920,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSingleLargestValue_306() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81197,8 +79940,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSingleLargestValue_307() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81221,8 +79963,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSingleSmallestValue_308() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81242,8 +79983,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSingleSmallestValue_309() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81266,8 +80006,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSingleNullValue_310() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81287,8 +80026,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSingleNullValue_311() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81310,8 +80048,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSingle0Value_312() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81331,8 +80068,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSingle0Value_313() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81355,8 +80091,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableDoubleMediumValue_314() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81376,8 +80111,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableDoubleMediumValue_315() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81400,8 +80134,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableDoubleLargestValue_316() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81421,8 +80154,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableDoubleLargestValue_317() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81445,8 +80177,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableDoubleSmallestValue_318() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81466,8 +80197,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableDoubleSmallestValue_319() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81490,8 +80220,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableDoubleNullValue_320() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81511,8 +80240,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableDoubleNullValue_321() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81534,8 +80262,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableDouble0Value_322() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81555,8 +80282,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableDouble0Value_323() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81579,8 +80305,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum8MinValue_324() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81600,8 +80325,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableEnum8MinValue_325() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81624,8 +80348,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum8MaxValue_326() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81645,8 +80368,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableEnum8MaxValue_327() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81669,8 +80391,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum8InvalidValue_328() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81689,8 +80410,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableEnum8UnchangedValue_329() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81713,8 +80433,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum8NullValue_330() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81734,8 +80453,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableEnum8NullValue_331() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81757,8 +80475,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum16MinValue_332() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81778,8 +80495,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableEnum16MinValue_333() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81802,8 +80518,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum16MaxValue_334() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81823,8 +80538,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableEnum16MaxValue_335() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81847,8 +80561,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum16InvalidValue_336() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81867,8 +80580,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableEnum16UnchangedValue_337() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81891,8 +80603,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableEnum16NullValue_338() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81912,8 +80623,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableEnum16NullValue_339() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81935,8 +80645,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSimpleEnumMinValue_340() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81956,8 +80665,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSimpleEnumMinValue_341() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -81980,8 +80688,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSimpleEnumMaxValue_342() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82001,8 +80708,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSimpleEnumMaxValue_343() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82025,8 +80731,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSimpleEnumInvalidValue_344() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82045,8 +80750,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSimpleEnumUnchangedValue_345() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82069,8 +80773,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableSimpleEnumNullValue_346() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82090,8 +80793,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableSimpleEnumNullValue_347() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82113,8 +80815,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableOctetStringDefaultValue_348() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82138,8 +80839,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableOctetString_349() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82159,8 +80859,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableOctetString_350() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82184,8 +80883,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableOctetString_351() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82205,8 +80903,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableOctetString_352() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82228,8 +80925,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableOctetString_353() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82249,8 +80945,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableOctetString_354() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82274,8 +80969,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableCharStringDefaultValue_355() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82298,8 +80992,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableCharString_356() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82319,8 +81012,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableCharString_357() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82343,8 +81035,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableCharStringValueTooLong_358() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82364,8 +81055,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableCharString_359() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82387,8 +81077,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeNullableCharStringEmpty_360() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82408,8 +81097,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeNullableCharString_361() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82432,8 +81120,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeFromNonexistentEndpoint_362() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:200 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82449,8 +81136,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeFromNonexistentCluster_363() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82466,8 +81152,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_364() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82487,8 +81172,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSendACommandThatTakesAnOptionalParameterButDoNotSetIt_365() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82512,8 +81196,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReportSubscribeToListAttribute_366() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82540,8 +81223,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestSubscribeToListAttribute_367() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82572,8 +81254,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteSubscribedToListAttribute_368() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82600,8 +81281,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestCheckForListAttributeReport_369() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82627,8 +81307,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadRangeRestrictedUnsigned8BitInteger_370() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82650,8 +81329,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned8BitInteger_371() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82671,8 +81349,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned8BitInteger_372() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82693,8 +81370,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned8BitInteger_373() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82715,8 +81391,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned8BitInteger_374() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82736,8 +81411,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_375() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82759,8 +81433,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned8BitInteger_376() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82782,8 +81455,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_377() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82805,8 +81477,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned8BitInteger_378() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82828,8 +81499,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_379() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82851,8 +81521,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned8BitInteger_380() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82874,8 +81543,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_381() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82897,8 +81565,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadRangeRestrictedUnsigned16BitInteger_382() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82920,8 +81587,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToARangeRestrictedUnsigned16BitInteger_383() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82941,8 +81607,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedUnsigned16BitInteger_384() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82963,8 +81628,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedUnsigned16BitInteger_385() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -82985,8 +81649,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValueToARangeRestrictedUnsigned16BitInteger_386() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83006,8 +81669,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_387() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83029,8 +81691,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToARangeRestrictedUnsigned16BitInteger_388() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83052,8 +81713,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_389() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83075,8 +81735,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedUnsigned16BitInteger_390() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83098,8 +81757,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_391() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83121,8 +81779,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedUnsigned16BitInteger_392() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83145,8 +81802,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_393() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83168,8 +81824,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadRangeRestrictedSigned8BitInteger_394() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83191,8 +81846,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned8BitInteger_395() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83211,8 +81865,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned8BitInteger_396() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83234,8 +81887,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned8BitInteger_397() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83257,8 +81909,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned8BitInteger_398() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83277,8 +81928,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueHasNotChanged_399() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83300,8 +81950,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned8BitInteger_400() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83322,8 +81971,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMinValid_401() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83345,8 +81993,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned8BitInteger_402() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83367,8 +82014,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_403() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83390,8 +82036,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned8BitInteger_404() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83413,8 +82058,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedSigned8BitIntegerValueIsAtMidValid_405() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83436,8 +82080,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadRangeRestrictedSigned16BitInteger_406() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83459,8 +82102,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToARangeRestrictedSigned16BitInteger_407() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83480,8 +82122,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustBelowRangeValueToARangeRestrictedSigned16BitInteger_408() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83502,8 +82143,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustAboveRangeValueToARangeRestrictedSigned16BitInteger_409() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83524,8 +82164,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValueToARangeRestrictedSigned16BitInteger_410() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83545,8 +82184,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueHasNotChanged_411() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83568,8 +82206,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToARangeRestrictedSigned16BitInteger_412() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83591,8 +82228,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMinValid_413() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83614,8 +82250,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToARangeRestrictedSigned16BitInteger_414() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83637,8 +82272,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_415() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83660,8 +82294,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToARangeRestrictedSigned16BitInteger_416() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83683,8 +82316,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyRangeRestrictedSigned16BitIntegerValueIsAtMidValid_417() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83706,8 +82338,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadNullableRangeRestrictedUnsigned8BitInteger_418() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83731,8 +82362,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned8BitInteger_419() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83753,8 +82383,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned8BitInteger_420() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83775,8 +82404,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned8BitInteger_421() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83797,8 +82425,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned8BitInteger_422() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83819,8 +82446,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueHasNotChanged_423() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83844,8 +82470,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned8BitInteger_424() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83867,8 +82492,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMinValid_425() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83892,8 +82516,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned8BitInteger_426() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83915,8 +82538,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMaxValid_427() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83940,8 +82562,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned8BitInteger_428() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83963,8 +82584,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsAtMidValid_429() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -83988,8 +82608,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned8BitInteger_430() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84011,8 +82630,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned8BitIntegerValueIsNull_431() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84035,8 +82653,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadNullableRangeRestrictedUnsigned16BitInteger_432() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84060,8 +82677,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedUnsigned16BitInteger_433() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84083,8 +82699,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedUnsigned16BitInteger_434() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84106,8 +82721,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedUnsigned16BitInteger_435() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84129,8 +82743,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedUnsigned16BitInteger_436() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84152,8 +82765,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueHasNotChanged_437() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84177,8 +82789,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedUnsigned16BitInteger_438() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84200,8 +82811,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMinValid_439() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84225,8 +82835,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedUnsigned16BitInteger_440() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84248,8 +82857,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMaxValid_441() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84273,8 +82881,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedUnsigned16BitInteger_442() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84296,8 +82903,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsAtMidValid_443() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84321,8 +82927,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedUnsigned16BitInteger_444() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84344,8 +82949,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedUnsigned16BitIntegerValueIsNull_445() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84368,8 +82972,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadNullableRangeRestrictedSigned8BitInteger_446() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84393,8 +82996,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned8BitInteger_447() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84415,8 +83017,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned8BitInteger_448() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84437,8 +83038,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned8BitInteger_449() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84459,8 +83059,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned8BitInteger_450() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84481,8 +83080,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueHasNotChanged_451() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84506,8 +83104,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned8BitInteger_452() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84529,8 +83126,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMinValid_453() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84554,8 +83150,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned8BitInteger_454() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84577,8 +83172,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMaxValid_455() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84602,8 +83196,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned8BitInteger_456() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84625,8 +83218,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtMidValid_457() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84650,8 +83242,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned8BitInteger_458() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84673,8 +83264,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedSigned8BitIntegerValueIsAtNull_459() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84697,8 +83287,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadNullableRangeRestrictedSigned16BitInteger_460() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84722,8 +83311,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValueToANullableRangeRestrictedSigned16BitInteger_461() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84745,8 +83333,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustBelowRangeValueToANullableRangeRestrictedSigned16BitInteger_462() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84768,8 +83355,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteJustAboveRangeValueToANullableRangeRestrictedSigned16BitInteger_463() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84791,8 +83377,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValueToANullableRangeRestrictedSigned16BitInteger_464() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84814,8 +83399,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueHasNotChanged_465() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84839,8 +83423,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMinValidValueToANullableRangeRestrictedSigned16BitInteger_466() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84862,8 +83445,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMinValid_467() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84887,8 +83469,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMaxValidValueToANullableRangeRestrictedSigned16BitInteger_468() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84910,8 +83491,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMaxValid_469() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84935,8 +83515,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteMiddleValidValueToANullableRangeRestrictedSigned16BitInteger_470() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84958,8 +83537,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsAtMidValid_471() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -84983,8 +83561,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteNullValueToANullableRangeRestrictedSigned16BitInteger_472() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85006,8 +83583,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestVerifyNullableRangeRestrictedSigned16BitIntegerValueIsNull_473() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85030,8 +83606,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeThatReturnsGeneralStatusOnWrite_474() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85050,8 +83625,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteAttributeThatReturnsClusterSpecificStatusOnWrite_475() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85071,8 +83645,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeThatReturnsGeneralStatusOnRead_476() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85088,8 +83661,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeThatReturnsClusterSpecificStatusOnRead_477() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85105,8 +83677,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadAcceptedCommandListAttribute_478() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85146,8 +83717,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadGeneratedCommandListAttribute_479() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85177,8 +83747,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestWriteStructTypedAttribute_480() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85207,8 +83776,7 @@ class TestCluster : public TestCommandBridge { CHIP_ERROR TestReadStructTypedAttribute_481() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85466,15 +84034,15 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWriteAttributeInt32uValue_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85494,8 +84062,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uValueMinValueConstraints_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85516,8 +84083,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uValueMaxValueConstraints_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85538,8 +84104,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uValueNotValueConstraints_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85560,8 +84125,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uValueBackToDefaultValue_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85581,8 +84145,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85602,8 +84165,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueMinLengthConstraints_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85621,8 +84183,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueMaxLengthConstraints_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85640,8 +84201,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueStartsWithConstraints_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85659,8 +84219,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueEndsWithConstraints_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85678,8 +84237,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85699,8 +84257,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85719,8 +84276,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85740,8 +84296,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85760,8 +84315,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85781,8 +84335,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueIsLowerCaseIsUpperCaseConstraints_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85801,8 +84354,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85822,8 +84374,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85841,8 +84392,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValue_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85862,8 +84412,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringValueIsHexStringConstraints_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85881,8 +84430,7 @@ class TestConstraints : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringValueBackToDefaultValue_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -85986,15 +84534,17 @@ class TestDelayCommands : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWait100ms_1() { - SetIdentity("alpha"); - WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } }; @@ -86091,22 +84641,25 @@ class TestLogCommands : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestLogASimpleMessage_1() { - SetIdentity("alpha"); - Log(@"This is a simple message"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("This is a simple messagegarbage: not in length on purpose", 24); + Log("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestDoASimpleUserPromptMessage_2() { - SetIdentity("alpha"); - UserPrompt(@"This is a simple message"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("This is a simple messagegarbage: not in length on purpose", 24); + UserPrompt("alpha", value); return CHIP_NO_ERROR; } }; @@ -86958,16 +85511,16 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } NSNumber * _Nonnull TestAddArgumentDefaultValue; CHIP_ERROR TestSendTestAddArgumentsCommand_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -86997,8 +85550,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestSendTestAddArgumentsCommand_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87025,8 +85577,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestSendTestAddArgumentsCommand_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87054,8 +85605,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBooleanDefaultValue_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87080,8 +85630,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBooleanNotDefaultValue_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87101,8 +85650,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBooleanNotDefaultValue_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87123,8 +85671,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBooleanDefaultValue_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87144,8 +85691,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBooleanFalse_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87168,8 +85714,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap8DefaultValue_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87194,8 +85739,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap8NotDefaultValue_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87215,8 +85759,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap8NotDefaultValue_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87237,8 +85780,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap8DefaultValue_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87258,8 +85800,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap8DefaultValue_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87282,8 +85823,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap16DefaultValue_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87308,8 +85848,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap16NotDefaultValue_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87329,8 +85868,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap16NotDefaultValue_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87351,8 +85889,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap16DefaultValue_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87372,8 +85909,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap16DefaultValue_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87396,8 +85932,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32DefaultValue_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87422,8 +85957,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap32NotDefaultValue_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87443,8 +85977,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32NotDefaultValue_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87465,8 +85998,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap32DefaultValue_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87486,8 +86018,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap32DefaultValue_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87510,8 +86041,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap64DefaultValue_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87536,8 +86066,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap64NotDefaultValue_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87557,8 +86086,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap64DefaultValue_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87579,8 +86107,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeBitmap64DefaultValue_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87600,8 +86127,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeBitmap64DefaultValue_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87624,8 +86150,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8uDefaultValue_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87650,8 +86175,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8uNotDefaultValue_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87671,8 +86195,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8uNotDefaultValue_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87693,8 +86216,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8uDefaultValue_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87714,8 +86236,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8uDefaultValue_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87738,8 +86259,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16uDefaultValue_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87764,8 +86284,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16uNotDefaultValue_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87785,8 +86304,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16uNotDefaultValue_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87807,8 +86325,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16uDefaultValue_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87828,8 +86345,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16uDefaultValue_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87852,8 +86368,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uDefaultValue_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87878,8 +86393,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uNotDefaultValue_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87899,8 +86413,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uNotDefaultValue_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87921,8 +86434,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32uDefaultValue_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87942,8 +86454,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32uDefaultValue_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87966,8 +86477,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64uDefaultValue_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -87992,8 +86502,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64uNotDefaultValue_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88013,8 +86522,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64uNotDefaultValue_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88035,8 +86543,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64uDefaultValue_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88056,8 +86563,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64uDefaultValue_48() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88080,8 +86586,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8sDefaultValue_49() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88106,8 +86611,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8sNotDefaultValue_50() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88127,8 +86631,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8sNotDefaultValue_51() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88149,8 +86652,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt8sDefaultValue_52() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88170,8 +86672,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt8sDefaultValue_53() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88194,8 +86695,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16sDefaultValue_54() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88220,8 +86720,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16sNotDefaultValue_55() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88241,8 +86740,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16sNotDefaultValue_56() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88263,8 +86761,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt16sDefaultValue_57() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88284,8 +86781,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt16sDefaultValue_58() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88308,8 +86804,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32sDefaultValue_59() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88334,8 +86829,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32sNotDefaultValue_60() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88355,8 +86849,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32sNotDefaultValue_61() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88377,8 +86870,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt32sDefaultValue_62() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88398,8 +86890,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt32sDefaultValue_63() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88422,8 +86913,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64sDefaultValue_64() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88448,8 +86938,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeIntsNotDefaultValue_65() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88469,8 +86958,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64sNotDefaultValue_66() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88491,8 +86979,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeInt64sDefaultValue_67() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88512,8 +86999,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeInt64sDefaultValue_68() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88536,8 +87022,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum8DefaultValue_69() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88562,8 +87047,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum8NotDefaultValue_70() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88583,8 +87067,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum8NotDefaultValue_71() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88605,8 +87088,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum8DefaultValue_72() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88626,8 +87108,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum8DefaultValue_73() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88650,8 +87131,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum16DefaultValue_74() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88676,8 +87156,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum16NotDefaultValue_75() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88697,8 +87176,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum16NotDefaultValue_76() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88719,8 +87197,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEnum16DefaultValue_77() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88740,8 +87217,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEnum16DefaultValue_78() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88764,8 +87240,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochUsDefaultValue_79() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88790,8 +87265,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochUsNotDefaultValue_80() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88811,8 +87285,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochUsNotDefaultValue_81() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88833,8 +87306,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochUsDefaultValue_82() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88854,8 +87326,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochUsDefaultValue_83() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88878,8 +87349,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochSDefaultValue_84() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88904,8 +87374,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochSNotDefaultValue_85() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88925,8 +87394,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochSNotDefaultValue_86() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88947,8 +87415,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeEpochSDefaultValue_87() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88968,8 +87435,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeEpochSDefaultValue_88() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -88992,8 +87458,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeVendorIdDefaultValue_89() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89018,8 +87483,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeVendorIdNotDefaultValue_90() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89039,8 +87503,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeVendorIdNotDefaultValue_91() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89061,8 +87524,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeVendorIdDefaultValue_92() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89082,8 +87544,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeVendorIdDefaultValue_93() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89106,8 +87567,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringDefaultValue_94() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89132,8 +87592,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringDefaultValueAndCompareToSavedValue_95() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89155,8 +87614,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringNotDefaultValue_96() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89177,8 +87635,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringNotDefaultValue_97() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89207,8 +87664,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToSavedValue_98() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89234,8 +87690,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringNotDefaultValueFromSavedValue_99() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89255,8 +87710,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeCharStringNotDefaultValueAndCompareToExpectedValue_100() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89278,8 +87732,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeCharStringDefaultValue_101() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89300,8 +87753,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringDefaultValue_102() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89326,8 +87778,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringDefaultValueAndCompareToSavedValue_103() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89349,8 +87800,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValue_104() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89371,8 +87821,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringNotDefaultValue_105() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89402,8 +87851,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToSavedValue_106() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89429,8 +87877,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringNotDefaultValueFromSavedValue_107() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89450,8 +87897,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestReadAttributeOctetStringNotDefaultValueAndCompareToExpectedValue_108() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89474,8 +87920,7 @@ class TestSaveAs : public TestCommandBridge { CHIP_ERROR TestWriteAttributeOctetStringDefaultValue_109() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestTestCluster * cluster = [[CHIPTestTestCluster alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89600,15 +88045,15 @@ class TestDescriptorCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAttributeDeviceList_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89632,8 +88077,7 @@ class TestDescriptorCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeServerList_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89681,8 +88125,7 @@ class TestDescriptorCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributeClientList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89705,8 +88148,7 @@ class TestDescriptorCluster : public TestCommandBridge { CHIP_ERROR TestReadAttributePartsList_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89926,15 +88368,15 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadLocation_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89956,8 +88398,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestWriteLocation_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -89977,8 +88418,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadBackLocation_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90000,8 +88440,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestRestoreInitialLocationValue_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90021,8 +88460,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadAttributeListValue_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90068,8 +88506,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadNodeLabel_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90091,8 +88528,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestWriteNodeLabel_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90112,8 +88548,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadBackNodeLabel_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90135,8 +88570,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadLocalConfigDisabled_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90158,8 +88592,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestWriteLocalConfigDisabled_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90179,8 +88612,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadBackLocalConfigDisabled_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90202,22 +88634,22 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestRebootTheDevice_12() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestConnectToTheDeviceAgain_13() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadBackNodeLabelAfterReboot_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90239,8 +88671,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestRestoreInitialNodeLabelValue_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90260,8 +88691,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestReadBackLocalConfigDisabledAfterReboot_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90283,8 +88713,7 @@ class TestBasicInformation : public TestCommandBridge { CHIP_ERROR TestRestoreInitialLocalConfigDisabledValue_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -90598,15 +89027,15 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWriteBreadcrumb12_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90628,8 +89057,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestReadBackBreadcrumb12_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90653,8 +89081,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestWriteBreadcrumb22_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90676,8 +89103,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestReadBackBreadcrumb22_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90701,22 +89127,22 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestRebootToResetBreadcrumb_5() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestConnectToTheDeviceAgain_6() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadBackBreadcrumbAfterRebootAndEnsureItWasNotPersisted_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90740,8 +89166,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestSetBreadcrumbToNonzeroValue_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90763,8 +89188,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbSetWorked_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90788,8 +89212,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestSendCommissioningCompleteWithoutArmedFailSafe_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90814,8 +89237,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByInvalidCommissioningComplete_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90839,8 +89261,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestOpenCommissioningWindowFromAlpha_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90862,8 +89283,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestTryToArmFailSafe_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90892,8 +89312,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithCommissioningWindowOpen_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90917,8 +89336,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestResetBreadcrumbTo0SoWeCanCommission_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90940,22 +89358,24 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCommissionFromBeta_16() { - SetIdentity("beta"); - PairWithQRCode(74565, mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = 74565ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_17() { - SetIdentity("beta"); - WaitForCommissionee(74565); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = 74565ULL; + WaitForCommissionee("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestArmFailSafe_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -90984,8 +89404,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasProperlySetByArmFailSafe_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91009,8 +89428,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestTryToArmFailSafeFromWrongFabric_20() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91039,8 +89457,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithExistingFailSafeArmed_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91064,8 +89481,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestSendCommissioningCompleteFromWrongFabric_22() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91090,8 +89506,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasNotTouchedByCommissioningCompleteFromWrongFabric_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91115,8 +89530,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCloseOutTheFailSafeGracefully_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91141,8 +89555,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasResetTo0ByCommissioningComplete_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91166,8 +89579,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestArmFailSafeAgain_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91196,8 +89608,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasSetByArmingFailSafeAgain_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91221,8 +89632,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestForceExpireTheFailSafe_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91251,8 +89661,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestCheckBreadcrumbWasResetByExpiringTheFailSafe_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91276,8 +89685,7 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR TestValidatePresenceOfSupportsConcurrentConnection_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91382,15 +89790,15 @@ class TestIdentifyCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendIdentifyCommandAndExpectSuccessResponse_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -91536,15 +89944,15 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadNumberOfSupportedFabrics_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91568,8 +89976,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestReadNumberOfCommissionedFabrics_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91594,8 +90001,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestReadCurrentFabricIndex_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91622,8 +90028,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestRemoveNonexistentFabric_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91651,8 +90056,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestReadFabricListBeforeSettingLabel_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91684,8 +90088,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestSetTheFabricLabel_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -91718,8 +90121,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { CHIP_ERROR TestReadFabricListAfterSettingLabel_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -92047,15 +90449,15 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadDescription_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92077,8 +90479,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadStandardNamespace_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92101,8 +90502,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadSupportedModes_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92139,8 +90539,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadCurrentMode_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92162,8 +90561,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadStartUpMode_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92186,8 +90584,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestReadOnMode_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92209,8 +90606,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeToSupportedMode_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92231,8 +90627,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyCurrentModeChange_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92257,8 +90652,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeToUnsupportedMode_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92277,8 +90671,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestToggleOnOff_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92295,8 +90688,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestToggleOnOff_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92313,8 +90705,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyCurrentModeDoesNotChangeWhenOnModeIsNull_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92336,8 +90727,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeToUnsupportedOnMode_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92356,8 +90746,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeOnMode_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92378,8 +90767,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyOnMode_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92405,8 +90793,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestToggleOnOff_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92423,8 +90810,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestToggleOnOff_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92441,8 +90827,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyCurrentModeChangesIfOnModeIsNotNull_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92464,8 +90849,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeToUnsupportedStartUpMode_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92484,8 +90868,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeToSupportedStartUpMode_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92505,8 +90888,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestVerifyStartUpModeChange_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92529,8 +90911,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeCurrentModeToAnotherValue_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92550,8 +90931,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeOnMode_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92571,8 +90951,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestSetStartUpOnOff_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92592,22 +90971,22 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_25() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_26() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestVerifyCurrentModeChangeBasedOnOnModeAsItOverwritesStartUpMode_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92629,8 +91008,7 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestChangeOnModeToNull_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92650,22 +91028,22 @@ class TestModeSelectCluster : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_29() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_30() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestVerifyCurrentModeChangeBasedOnNewStartUpMode_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -92785,15 +91163,15 @@ class TestSelfFabricRemoval : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadNumberOfCommissionedFabrics_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -92819,8 +91197,7 @@ class TestSelfFabricRemoval : public TestCommandBridge { CHIP_ERROR TestReadCurrentFabricIndex_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -92847,8 +91224,7 @@ class TestSelfFabricRemoval : public TestCommandBridge { CHIP_ERROR TestRemoveSingleOwnFabric_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -93004,15 +91380,15 @@ class TestBinding : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWriteEmptyBindingTable_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93035,8 +91411,7 @@ class TestBinding : public TestCommandBridge { CHIP_ERROR TestReadEmptyBindingTable_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93061,8 +91436,7 @@ class TestBinding : public TestCommandBridge { CHIP_ERROR TestWriteInvalidBindingTable_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93094,8 +91468,7 @@ class TestBinding : public TestCommandBridge { CHIP_ERROR TestWriteBindingTableEndpoint1_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93133,8 +91506,7 @@ class TestBinding : public TestCommandBridge { CHIP_ERROR TestReadBindingTableEndpoint1_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93175,8 +91547,7 @@ class TestBinding : public TestCommandBridge { CHIP_ERROR TestWriteBindingTableEndpoint0_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93204,8 +91575,7 @@ class TestBinding : public TestCommandBridge { CHIP_ERROR TestReadBindingTableEndpoint0_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93236,8 +91606,7 @@ class TestBinding : public TestCommandBridge { CHIP_ERROR TestVerifyEndpoint1NotChanged_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93397,15 +91766,15 @@ class TestUserLabelCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestClearUserLabelList_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93428,8 +91797,7 @@ class TestUserLabelCluster : public TestCommandBridge { CHIP_ERROR TestReadUserLabelList_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93451,8 +91819,7 @@ class TestUserLabelCluster : public TestCommandBridge { CHIP_ERROR TestWriteUserLabelList_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93491,22 +91858,22 @@ class TestUserLabelCluster : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_4() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_5() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestVerify_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93642,22 +92009,22 @@ class TestArmFailSafe : public TestCommandBridge { CHIP_ERROR TestRebootTargetDevice_0() { - SetIdentity("alpha"); - Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheAlphaDeviceToBeRetrieved_1() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestQueryFabricsList_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -93687,8 +92054,7 @@ class TestArmFailSafe : public TestCommandBridge { CHIP_ERROR TestArmFailSafeOnTargetDeviceWithTimeout0_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -93717,8 +92083,7 @@ class TestArmFailSafe : public TestCommandBridge { CHIP_ERROR TestReadsNodeLabelMandatoryAttributeOfTargetDevice_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -93947,37 +92312,40 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestStopTargetDevice_0() { - SetIdentity("alpha"); - Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + Stop("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() { - SetIdentity("alpha"); - Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + Start("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForAlpha_2() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCommissionFromAlphaWhenTheCommissioningWindowIsNotOpened_3() { - SetIdentity("alpha"); - PairWithQRCode(mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestOpenCommissioningWindowFromAlpha_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -93999,16 +92367,16 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestCommissionFromAlphaAgain_5() { - SetIdentity("alpha"); - PairWithQRCode(mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCheckThatWeJustHaveTheOneFabricAndDidNotAddANewOne_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94035,8 +92403,7 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestCloseCommissioningWindowAfterFailedCommissioning_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94055,8 +92422,7 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestOpenCommissioningWindowFromAlphaAgain_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94078,23 +92444,24 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestCommissionFromBeta_9() { - SetIdentity("beta"); - PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_10() { - SetIdentity("beta"); - WaitForCommissionee(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + WaitForCommissionee("beta", value); return CHIP_NO_ERROR; } CHIP_ERROR TestOpenCommissioningWindowFromBeta_11() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94116,24 +92483,25 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestCommissionFromGamma_12() { - SetIdentity("gamma"); - PairWithQRCode(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL, - mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + PairWithQRCode("gamma", value); return CHIP_NO_ERROR; } CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForGamma_13() { - SetIdentity("gamma"); - WaitForCommissionee(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + WaitForCommissionee("gamma", value); return CHIP_NO_ERROR; } NSString * _Nonnull readFromAlpha; CHIP_ERROR TestReadTheMandatoryAttributeNodeLabelFromAlpha_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -94158,8 +92526,7 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestWriteTheMandatoryAttributeNodeLabelFromBeta_15() { - SetIdentity("beta"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("beta"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -94179,8 +92546,7 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestReadTheMandatoryAttributeNodeLabelFromGamma_16() { - SetIdentity("gamma"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("gamma"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -94201,8 +92567,7 @@ class TestMultiAdmin : public TestCommandBridge { CHIP_ERROR TestWriteTheMandatoryAttributeNodeLabelBackToDefault_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -94339,15 +92704,15 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadsAListOfThreadMetricsStructNonGlobalAttributeFromDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94367,8 +92732,7 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentHeapFreeNonGlobalAttributeValueFromDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94393,8 +92757,7 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentHeapUsedNonGlobalAttributeValueFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94419,8 +92782,7 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentHeapHighWaterMarkNonGlobalAttributeValueFromDut_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94625,15 +92987,15 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSendsResetWatermarksToDut_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94652,8 +93014,7 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentHeapUsedAttributeValueFromDut_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94678,8 +93039,7 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { CHIP_ERROR TestReadsCurrentHeapHighWaterMarkAttributeValueFromDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestSoftwareDiagnostics * cluster = [[CHIPTestSoftwareDiagnostics alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -94830,15 +93190,15 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestSetOnOffAttributeToFalse_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -94857,8 +93217,7 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestReportSubscribeOnOffAttribute_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -94881,8 +93240,7 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestSubscribeOnOffAttribute_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -94913,8 +93271,7 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestTurnOnTheLightToSeeAttributeChange_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -94931,8 +93288,7 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestCheckForAttributeReport_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -94954,8 +93310,7 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestTurnOffTheLightToSeeAttributeChange_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -94972,8 +93327,7 @@ class TestSubscribe_OnOff : public TestCommandBridge { CHIP_ERROR TestCheckForAttributeReport_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -95787,15 +94141,15 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadAvailableUserSlotAndVerifyResponseFields_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -95867,8 +94221,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestGetNumberOfSupportedUsersAndVerifyDefaultValue_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -95894,8 +94247,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadFailsForUserWithIndex0_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -95914,8 +94266,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadFailsForUserWithIndexGreaterThanNumberOfUsersSupported_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -95934,8 +94285,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewUserWithDefaultParameters_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -95961,8 +94311,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheUserBackAndVerifyItsFields_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96039,8 +94388,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestSetUserAtTheOccupiedIndexFailsWithAppropriateResponse_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96065,8 +94413,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestModifyUserNameForExistingUser_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96092,8 +94439,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96170,8 +94516,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestModifyUserUniqueIdForExistingUser_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96197,8 +94542,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96276,8 +94620,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestModifyUserStatusForExistingUser_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96303,8 +94646,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96382,8 +94724,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestModifyUserTypeForExistingUser_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96409,8 +94750,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96488,8 +94828,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestModifyCredentialRuleForExistingUser_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96515,8 +94854,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96594,8 +94932,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestModifyAllFieldsForExistingUser_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96621,8 +94958,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheModifiedUserBackAndVerifyItsFields_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96700,8 +95036,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestAddAnotherUserWithNonDefaultFields_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96727,8 +95062,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheNewUserBackAndVerifyItsFields_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96806,8 +95140,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateUserInTheLastSlot_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96833,8 +95166,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheLastUserBackAndVerifyItsFields_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96910,8 +95242,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestUserCreationInThe0SlotFails_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96936,8 +95267,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestUserCreationInTheOutOfBoundsSlotFails_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96962,8 +95292,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearFirstUser_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -96983,8 +95312,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadClearedUserAndVerifyItIsAvailable_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97055,8 +95383,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewUserInTheClearedSlot_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97082,8 +95409,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheUserInThePreviouslyClearedSlotAndVerifyItsFields_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97160,8 +95486,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearUserWithIndex0Fails_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97180,8 +95505,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearUserWithOutOfBoundsIndexFails_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97200,8 +95524,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearAllUsers_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97221,8 +95544,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadFirstClearedUserAndVerifyItIsAvailable_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97293,8 +95615,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadLastClearedUserAndVerifyItIsAvailable_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97365,8 +95686,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestGetNumberOfSupportedPinCredentialsAndVerifyDefaultValue_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97392,8 +95712,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCheckThatPinCredentialDoesNotExist_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97433,8 +95752,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadingPinCredentialWithIndex0Fails_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97457,8 +95775,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadingPinCredentialWithOutOfBoundsIndexFails_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97482,8 +95799,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewPinCredentialAndUser_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97529,8 +95845,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedUser_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97612,8 +95927,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedPinCredential_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97654,8 +95968,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewPinCredentialAndUserWithIndex0Fails_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97700,8 +96013,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewPinCredentialAndUserWithOutOfBoundsIndexFails_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97747,8 +96059,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestGetNumberOfSupportedRfidCredentialsAndVerifyDefaultValue_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97774,8 +96085,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadingRfidCredentialWithIndex0Fails_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97798,8 +96108,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadingRfidCredentialWithOutOfBoundsIndexFails_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97823,8 +96132,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCheckThatRfidCredentialDoesNotExist_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97864,8 +96172,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewRfidCredentialAndAddItToExistingUser_48() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97910,8 +96217,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestVerifyModifiedUser_49() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -97997,8 +96303,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedCredential_50() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98039,8 +96344,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewRfidCredentialAndUserWithIndex0Fails_51() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98085,8 +96389,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewRfidCredentialAndUserWithOutOfBoundsIndexFails_52() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98131,8 +96434,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewPinCredentialAndTryToAddItToExistingUser_53() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98177,8 +96479,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewCredentialAndTryToAddItTo0User_54() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98223,8 +96524,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewCredentialAndTryToAddItToOutOfBoundsUser_55() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98269,8 +96569,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewPinWithTooShortData_56() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98315,8 +96614,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewPinWithTooLongData_57() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98361,8 +96659,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewRfidWithTooShortData_58() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98407,8 +96704,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewPinWithProgrammingUserTypeFails_59() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98453,8 +96749,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewRfidWithTooShortData_60() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98499,8 +96794,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewPinCredentialWithDataTheWouldCauseDuplicate_61() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98545,8 +96839,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewRfidCredentialWithDataTheWouldCauseDuplicate_62() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98591,8 +96884,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestModifyCredentialDataOfExistingPinCredential_63() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98637,8 +96929,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithOldData_64() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98684,8 +96975,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestVerifyThatCredentialWasChangedByCreatingNewCredentialWithNewData_65() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98730,8 +97020,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearFirstPinCredential_66() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98754,8 +97043,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadBackTheCredentialAndMakeSureItIsDeleted_67() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98795,8 +97083,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheUserBackAndMakeSurePinCredentialIsDeleted_68() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98878,8 +97165,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearTheSecondPinCredential_69() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98902,8 +97188,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadBackTheCredentialAndMakeSureItIsDeleted_70() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -98943,8 +97228,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheUserBackAndMakeSureRelatedUserIsDeleted_71() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99015,8 +97299,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewRfidCredentialWithUser_72() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99062,8 +97345,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearAllTheRfidCredentials_73() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99086,8 +97368,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadBackTheFistRfidCredentialAndMakeSureItIsDeleted_74() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99127,8 +97408,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadBackTheSecondRfidCredentialAndMakeSureItIsDeleted_75() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99168,8 +97448,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItIsDeleted_76() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99240,8 +97519,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheUserRelatedWithSecondRfidBackAndMakeSureItIsDeleted_77() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99312,8 +97590,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewPinCredentialWithUser_78() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99359,8 +97636,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewRfidCredentialWithUser_79() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99406,8 +97682,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateAnotherRfidCredentialWithUser_80() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99453,8 +97728,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearAllTheCredentials_81() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99474,8 +97748,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadBackTheFirstPinCredentialAndMakeSureItIsDeleted_82() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99515,8 +97788,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadBackTheFirstRfidCredentialAndMakeSureItIsDeleted_83() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99556,8 +97828,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadBackTheSecondPinCredentialAndMakeSureItIsDeleted_84() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99597,8 +97868,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheUserRelatedWithFirstPinBackAndMakeSureItIsDeleted_85() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99669,8 +97939,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheUserRelatedWithFirstRfidBackAndMakeSureItIsDeleted_86() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99741,8 +98010,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestReadTheUserRelatedWithSecondPinBackAndMakeSureItIsDeleted_87() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99813,8 +98081,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewProgrammingPinCredentialWithInvalidIndex_88() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99858,8 +98125,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestCreateNewProgrammingPinCredentialWithValidIndex_89() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99904,8 +98170,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedUser_90() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -99987,8 +98252,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedProgrammingPinCredential_91() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100028,8 +98292,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestModifyTheProgrammingPinCredential_92() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100073,8 +98336,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearingProgrammingPinFails_93() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100096,8 +98358,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearingProgrammingPinWithInvalidIndexFails_94() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100119,8 +98380,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearingPinCredentialWithZeroIndexFails_95() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100142,8 +98402,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearingPinCredentialWithOutOfBoundIndexFails_96() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100166,8 +98425,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearingRfidCredentialWithZeroIndexFails_97() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100189,8 +98447,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearingRfidCredentialWithOutOfBoundIndexFails_98() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100213,8 +98470,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestClearTheProgrammingPinUser_99() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100234,8 +98490,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestMakeSureProgrammingPinUserIsDeleted_100() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100306,8 +98561,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { CHIP_ERROR TestMakeSureProgrammingPinCredentialIsDeleted_101() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100493,15 +98747,15 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCreateNewPinCredentialAndLockUnlockUser_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100547,8 +98801,7 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToUnlockTheDoorWithInvalidPin_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100567,8 +98820,7 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToLocked_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100591,8 +98843,7 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToUnlockTheDoorWithValidPin_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100612,8 +98863,7 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToUnlocked_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100636,8 +98886,7 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToLockTheDoorWithInvalidPin_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100656,8 +98905,7 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToUnlocked_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100680,8 +98928,7 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestTryToUnlockTheDoorWithValidPin_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100701,8 +98948,7 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestVerifyThatLockStateAttributeValueIsSetToLocked_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -100725,8 +98971,7 @@ class DL_LockUnlock : public TestCommandBridge { CHIP_ERROR TestCleanTheCreatedCredential_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101411,15 +99656,15 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCreateNewPinCredentialAndScheduleUser_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101466,8 +99711,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetNumberOfSupportedUsers_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101494,8 +99738,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetMaxNumberOfWeekDaySchedulesForUserAndVerifyDefaultValue_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101522,8 +99765,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetMaxNumberOfYearDaySchedulesForUserAndVerifyDefaultValue_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101549,8 +99791,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWith0Index_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101575,8 +99816,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithOutOfBoundsIndex_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101601,8 +99841,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWith0UserIndex_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101627,8 +99866,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithOutOfBoundsUserIndex_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101653,8 +99891,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleForNonExistingUser_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101679,8 +99916,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWith0DaysMask_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101705,8 +99941,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleForSundayAndMonday_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101731,8 +99966,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleForSundayWednesdayAndSaturday_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101757,8 +99991,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithInvalidStartHour_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101783,8 +100016,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithInvalidStartMinute_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101809,8 +100041,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithInvalidEndHour_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101835,8 +100066,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithInvalidEndMinute_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101861,8 +100091,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithStartHourLaterThatEndHour_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101887,8 +100116,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithStartMinuteLaterThatEndMinuteWhenHoursAreEqual_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101915,8 +100143,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestMakeSureThatPreviousOperationsDidNotCreateASchedule_19() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101953,8 +100180,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetWeekDayScheduleWith0Index_20() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -101991,8 +100217,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetWeekDayScheduleWithOutOfBoundsIndex_21() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102030,8 +100255,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetWeekDayScheduleWith0UserIndex_22() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102068,8 +100292,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetWeekDayScheduleWithOutOfBoundsUserIndex_23() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102107,8 +100330,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetWeekDayScheduleWithNonExistingUserIndex_24() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102145,8 +100367,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateYearDayScheduleWith0Index_25() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102168,8 +100389,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateYearDayScheduleWithOutOfBoundsIndex_26() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102191,8 +100411,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateYearDayScheduleWith0UserIndex_27() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102214,8 +100433,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateYearDayScheduleWithOutOfBoundsUserIndex_28() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102237,8 +100455,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateYearDayScheduleForNonExistingUser_29() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102260,8 +100477,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateYearDayScheduleWithStartHourLaterThatEndHour_30() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102283,8 +100499,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestMakeSureThatPreviousOperationsDidNotCreateASchedule_31() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102321,8 +100536,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetYearDayScheduleWith0Index_32() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102359,8 +100573,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetYearDayScheduleWithOutOfBoundsIndex_33() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102398,8 +100611,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetYearDayScheduleWith0UserIndex_34() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102436,8 +100648,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetYearDayScheduleWithOutOfBoundsUserIndex_35() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102475,8 +100686,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestGetYearDayScheduleWithNonExistingUserIndex_36() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102513,8 +100723,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithValidParameters_37() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102540,8 +100749,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedSchedule_38() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102603,8 +100811,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateYearDayScheduleWithValidParameters_39() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102627,8 +100834,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedSchedule_40() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102675,8 +100881,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearWeekDayScheduleWith0Index_41() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102696,8 +100901,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearWeekDayScheduleWithOutOfBoundsIndex_42() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102717,8 +100921,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearWeekDayScheduleWith0UserIndex_43() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102738,8 +100941,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearWeekDayScheduleWithOutOfBoundsUserIndex_44() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102759,8 +100961,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearWeekDayScheduleWithNonExistingUser_45() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102780,8 +100981,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearYearDayScheduleWith0Index_46() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102801,8 +101001,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearYearDayScheduleWithOutOfBoundsIndex_47() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102822,8 +101021,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearYearDayScheduleWith0UserIndex_48() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102843,8 +101041,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearYearDayScheduleWithOutOfBoundsUserIndex_49() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102864,8 +101061,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearYearDayScheduleWithNonExistingUser_50() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102885,8 +101081,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestMakeSureThatWeekDayScheduleWasNotDeleted_51() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102948,8 +101143,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestMakeSureThatYearDayScheduleWasNotDeleted_52() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -102996,8 +101190,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateAnotherWeekDayScheduleWithValidParameters_53() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103023,8 +101216,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedWeekDaySchedule_54() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103086,8 +101278,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateAnotherYearDayScheduleWithValidParameters_55() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103110,8 +101301,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedYearDaySchedule_56() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103158,8 +101348,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearASingleWeekDayScheduleForTheFirstUser_57() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103180,8 +101369,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyClearedWeekDaySchedule_58() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103218,8 +101406,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearAllRemainingWeekDaySchedulesForTheFirstUser_59() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103240,8 +101427,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyClearedWeekSchedule_60() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103278,8 +101464,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestMakeSureThatFirstYearDayScheduleWasNotDeleted_61() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103326,8 +101511,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestMakeSureThatSecondYearDayScheduleWasNotDeleted_62() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103374,8 +101558,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateAnotherWeekDayScheduleWithValidParameters_63() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103401,8 +101584,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearASingleYearDayScheduleForTheFirstUser_64() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103423,8 +101605,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyClearedYearDaySchedule_65() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103461,8 +101642,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearAllRemainingYearSchedulesForTheFirstUser_66() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103483,8 +101663,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyThatSecondYearDayScheduleWasCleared_67() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103521,8 +101700,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedWeekDaySchedule_68() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103584,8 +101762,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestClearAllRemainingWeekDaySchedulesForTheFirstUser_69() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103606,8 +101783,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateNewUserWithoutCredentialSoWeCanAddMoreSchedulesToIt_70() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103633,8 +101809,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithValidParametersForFirstUser_71() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103660,8 +101835,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedWeekDayScheduleForFirstUser_72() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103723,8 +101897,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateYearDayScheduleForFirstUser_73() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103747,8 +101920,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedYearDayScheduleForFirst_74() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103795,8 +101967,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateWeekDayScheduleWithValidParametersForSecondUser_75() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103822,8 +101993,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedWeekDayScheduleForFirstUser_76() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103885,8 +102055,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCreateYearDayScheduleForSecondUser_77() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103909,8 +102078,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestVerifyCreatedYearDayScheduleForFirst_78() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103957,8 +102125,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestCleanup_79() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -103978,8 +102145,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestMakeSureClearingFirstUserAlsoClearedWeekDaySchedules_80() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104016,8 +102182,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestMakeSureClearingFirstUserAlsoClearedYearDaySchedules_81() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104054,8 +102219,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestMakeSureClearingSecondUserAlsoClearedWeekDaySchedules_82() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104092,8 +102256,7 @@ class DL_Schedules : public TestCommandBridge { CHIP_ERROR TestMakeSureClearingSecondUserAlsoClearedYearDaySchedules_83() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104263,15 +102426,15 @@ class Test_TC_DL_1_3 : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestCreateNewPinCredentialAndLockUnlockUser_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104317,8 +102480,7 @@ class Test_TC_DL_1_3 : public TestCommandBridge { CHIP_ERROR TestPreconditionDoorIsInLockedState_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104338,8 +102500,7 @@ class Test_TC_DL_1_3 : public TestCommandBridge { CHIP_ERROR TestThWritesAutoRelockTimeAttributeValueAs10SecondsOnTheDut_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104359,8 +102520,7 @@ class Test_TC_DL_1_3 : public TestCommandBridge { CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithValidPINCode_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104380,8 +102540,7 @@ class Test_TC_DL_1_3 : public TestCommandBridge { CHIP_ERROR TestThReadsAutoRelockTimeAttributeFromDut_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104403,15 +102562,15 @@ class Test_TC_DL_1_3 : public TestCommandBridge { CHIP_ERROR TestWait10000ms_6() { - SetIdentity("alpha"); - WaitForMs(10000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + WaitForMs("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsLockStateAttriute_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104434,8 +102593,7 @@ class Test_TC_DL_1_3 : public TestCommandBridge { CHIP_ERROR TestCleanTheCreatedCredential_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestDoorLock * cluster = [[CHIPTestDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104661,15 +102819,15 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestViewGroup0Invalid_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104699,8 +102857,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup1NotFound_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104730,8 +102887,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestAddGroup1New_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104762,8 +102918,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup1New_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104798,8 +102953,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup2NotFound_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104829,8 +102983,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestGetGroupMembership1All_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104865,8 +103018,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup3NotFound_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104896,8 +103048,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup1Existing_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104932,8 +103083,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestRemoveGroup0Invalid_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104963,8 +103113,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestRemoveGroup4NotFound_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -104994,8 +103143,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup1NotRemoved_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105030,8 +103178,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup2Removed_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105061,8 +103208,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestGetGroupMembership3_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105101,8 +103247,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestRemoveAll_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105119,8 +103264,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup1Removed_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105150,8 +103294,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup2StillRemoved_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105181,8 +103324,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestViewGroup3Removed_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105212,8 +103354,7 @@ class TestGroupsCluster : public TestCommandBridge { CHIP_ERROR TestGetGroupMembership4_18() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105448,15 +103589,15 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - SetIdentity("alpha"); - WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); return CHIP_NO_ERROR; } CHIP_ERROR TestReadMaxGroupsPerFabric_1() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105479,8 +103620,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestReadMaxGroupKeysPerFabric_2() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105504,8 +103644,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestAddGroup1_3() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105536,8 +103675,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestAddGroup2_4() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105568,8 +103706,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestKeySetWrite1_5() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105608,8 +103745,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestKeySetWrite2_6() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105648,8 +103784,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestKeySetRead_7() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105699,8 +103834,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestWriteGroupKeysInvalid_8() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105729,8 +103863,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestWriteGroupKeys_9() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105765,8 +103898,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestReadGroupKeys_10() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105806,8 +103938,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestReadGroupTable_11() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105848,8 +103979,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestKeySetRemove1_12() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105871,8 +104001,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestKeySetReadRemoved_13() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105894,8 +104023,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestKeySetReadNotRemoved_14() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105945,8 +104073,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestRemoveAll_15() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); @@ -105963,8 +104090,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestKeySetRemove2_16() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -105986,8 +104112,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { CHIP_ERROR TestKeySetReadAlsoRemoved_17() { - SetIdentity("alpha"); - CHIPDevice * device = GetConnectedDevice(); + CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 62ab083d6ffe1e..22136312476080 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -899,8 +899,9 @@ class TestAccessControlClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for commissionee"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Write entries"); @@ -1555,8 +1556,9 @@ class Test_TC_BI_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -1732,8 +1734,9 @@ class Test_TC_BI_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read mandatory non-global attribute: OutOfService"); @@ -1922,8 +1925,9 @@ class Test_TC_BI_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads PresentValue attribute from DUT"); @@ -2105,8 +2109,9 @@ class Test_TC_BOOL_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -2124,8 +2129,11 @@ class Test_TC_BOOL_1_1Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -2142,8 +2150,11 @@ class Test_TC_BOOL_1_1Suite : public TestCommand "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " "the value 0"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter '0' for success", "0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -2223,8 +2234,9 @@ class Test_TC_BOOL_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read mandatory non-global attribute: StateValue"); @@ -2336,8 +2348,9 @@ class Test_TC_BRAC_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read the global attribute: ClusterRevision"); @@ -2484,8 +2497,9 @@ class Test_TC_CC_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -2514,8 +2528,11 @@ class Test_TC_CC_1_1Suite : public TestCommand LogStep(6, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 7: { LogStep(7, "Read the global attribute: AcceptedCommandList"); @@ -2532,8 +2549,11 @@ class Test_TC_CC_1_1Suite : public TestCommand "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " "the value 0"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter '0' for success", "0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -3770,8 +3790,9 @@ class Test_TC_CC_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Validate constraints of attribute: current hue"); @@ -4738,8 +4759,9 @@ class Test_TC_CC_3_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -4766,8 +4788,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 5: { LogStep(5, "Wait 290ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Check current hue attribute value matched the value sent by the last command"); @@ -4775,8 +4798,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 7: { LogStep(7, "Wait 295ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "Check current hue attribute value matched the value sent by the last command"); @@ -4784,8 +4808,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 9: { LogStep(9, "Wait 300ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "Check current hue attribute value matched the value sent by the last command"); @@ -4803,8 +4828,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 12: { LogStep(12, "Wait 290ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { LogStep(13, "Check current hue attribute value matched the value sent by the last command"); @@ -4812,8 +4838,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 14: { LogStep(14, "Wait 295ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + return WaitForMs(kIdentityAlpha, value); } case 15: { LogStep(15, "Check current hue attribute value matched the value sent by the last command"); @@ -4821,8 +4848,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 16: { LogStep(16, "Wait 300ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { LogStep(17, "Check current hue attribute value matched the value sent by the last command"); @@ -4840,8 +4868,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 19: { LogStep(19, "Wait 290ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + return WaitForMs(kIdentityAlpha, value); } case 20: { LogStep(20, "Check current hue attribute value matched the value sent by the last command"); @@ -4849,8 +4878,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 21: { LogStep(21, "Wait 295ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + return WaitForMs(kIdentityAlpha, value); } case 22: { LogStep(22, "Check current hue attribute value matched the value sent by the last command"); @@ -4858,8 +4888,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 23: { LogStep(23, "Wait 300ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + return WaitForMs(kIdentityAlpha, value); } case 24: { LogStep(24, "Check current hue attribute value matched the value sent by the last command"); @@ -4877,8 +4908,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 26: { LogStep(26, "Wait 290ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + return WaitForMs(kIdentityAlpha, value); } case 27: { LogStep(27, "Check current hue attribute value matched the value sent by the last command"); @@ -4886,8 +4918,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 28: { LogStep(28, "Wait 295ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + return WaitForMs(kIdentityAlpha, value); } case 29: { LogStep(29, "Check current hue attribute value matched the value sent by the last command"); @@ -4895,8 +4928,9 @@ class Test_TC_CC_3_1Suite : public TestCommand } case 30: { LogStep(30, "Wait 300ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + return WaitForMs(kIdentityAlpha, value); } case 31: { LogStep(31, "Check current hue attribute value matched the value sent by the last command"); @@ -5185,8 +5219,9 @@ class Test_TC_CC_3_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -5212,8 +5247,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 5: { LogStep(5, "Wait 140ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(140); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 140UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Check current hue attribute value matched the value sent by the last command"); @@ -5221,8 +5257,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 7: { LogStep(7, "Wait 145ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(145); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 145UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "Check current hue attribute value matched the value sent by the last command"); @@ -5230,8 +5267,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 9: { LogStep(9, "Wait 150ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "Check current hue attribute value matched the value sent by the last command"); @@ -5248,8 +5286,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 12: { LogStep(12, "Wait 140ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(140); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 140UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { LogStep(13, "Check current hue attribute value matched the value sent by the last command"); @@ -5257,8 +5296,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 14: { LogStep(14, "Wait 145ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(145); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 145UL; + return WaitForMs(kIdentityAlpha, value); } case 15: { LogStep(15, "Check current hue attribute value matched the value sent by the last command"); @@ -5266,8 +5306,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 16: { LogStep(16, "Wait 150ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { LogStep(17, "Check current hue attribute value matched the value sent by the last command"); @@ -5284,8 +5325,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 19: { LogStep(19, "Wait 140ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(140); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 140UL; + return WaitForMs(kIdentityAlpha, value); } case 20: { LogStep(20, "Check current hue attribute value matched the value sent by the last command"); @@ -5293,8 +5335,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 21: { LogStep(21, "Wait 145ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(145); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 145UL; + return WaitForMs(kIdentityAlpha, value); } case 22: { LogStep(22, "Check current hue attribute value matched the value sent by the last command"); @@ -5302,8 +5345,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 23: { LogStep(23, "Wait 150ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + return WaitForMs(kIdentityAlpha, value); } case 24: { LogStep(24, "Check current hue attribute value matched the value sent by the last command"); @@ -5320,8 +5364,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 26: { LogStep(26, "Wait 140ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(140); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 140UL; + return WaitForMs(kIdentityAlpha, value); } case 27: { LogStep(27, "Check current hue attribute value matched the value sent by the last command"); @@ -5329,8 +5374,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 28: { LogStep(28, "Wait 145ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(145); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 145UL; + return WaitForMs(kIdentityAlpha, value); } case 29: { LogStep(29, "Check current hue attribute value matched the value sent by the last command"); @@ -5338,8 +5384,9 @@ class Test_TC_CC_3_2Suite : public TestCommand } case 30: { LogStep(30, "Wait 150ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + return WaitForMs(kIdentityAlpha, value); } case 31: { LogStep(31, "Check current hue attribute value matched the value sent by the last command"); @@ -5482,8 +5529,9 @@ class Test_TC_CC_3_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -5510,8 +5558,9 @@ class Test_TC_CC_3_3Suite : public TestCommand } case 5: { LogStep(5, "Wait 25ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(25); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 25UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Over TransitionTime,Read CurrentHue attribute from DUT"); @@ -5529,8 +5578,9 @@ class Test_TC_CC_3_3Suite : public TestCommand } case 8: { LogStep(8, "Wait 25ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(25); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 25UL; + return WaitForMs(kIdentityAlpha, value); } case 9: { LogStep(9, "Over TransitionTime,Read CurrentHue attribute from DUT"); @@ -5684,8 +5734,9 @@ class Test_TC_CC_4_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -5712,8 +5763,9 @@ class Test_TC_CC_4_1Suite : public TestCommand } case 5: { LogStep(5, "Wait 6ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(6); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 6UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Check current saturation attribute value matched the value sent by the last command"); @@ -5721,8 +5773,9 @@ class Test_TC_CC_4_1Suite : public TestCommand } case 7: { LogStep(7, "Wait 8ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(8); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 8UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "Check current saturation attribute value matched the value sent by the last command"); @@ -5730,8 +5783,9 @@ class Test_TC_CC_4_1Suite : public TestCommand } case 9: { LogStep(9, "Wait 10ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "Check current saturation attribute value matched the value sent by the last command"); @@ -6110,8 +6164,9 @@ class Test_TC_CC_4_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -6137,8 +6192,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 5: { LogStep(5, "Wait 40ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Check current saturation attribute value matched the value sent by the last command"); @@ -6146,8 +6202,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 7: { LogStep(7, "Wait 45ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "Check current saturation attribute value matched the value sent by the last command"); @@ -6155,8 +6212,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 9: { LogStep(9, "Wait 50ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "Check current saturation attribute value matched the value sent by the last command"); @@ -6173,8 +6231,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 12: { LogStep(12, "Wait 40ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { LogStep(13, "Check current saturation attribute value matched the value sent by the last command"); @@ -6182,8 +6241,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 14: { LogStep(14, "Wait 45ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + return WaitForMs(kIdentityAlpha, value); } case 15: { LogStep(15, "Check current saturation attribute value matched the value sent by the last command"); @@ -6191,8 +6251,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 16: { LogStep(16, "Wait 50ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { LogStep(17, "Check current saturation attribute value matched the value sent by the last command"); @@ -6209,8 +6270,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 19: { LogStep(19, "Wait 40ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + return WaitForMs(kIdentityAlpha, value); } case 20: { LogStep(20, "Check current saturation attribute value matched the value sent by the last command"); @@ -6218,8 +6280,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 21: { LogStep(21, "Wait 45ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + return WaitForMs(kIdentityAlpha, value); } case 22: { LogStep(22, "Check current saturation attribute value matched the value sent by the last command"); @@ -6227,8 +6290,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 23: { LogStep(23, "Wait 50ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + return WaitForMs(kIdentityAlpha, value); } case 24: { LogStep(24, "Check current saturation attribute value matched the value sent by the last command"); @@ -6245,8 +6309,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 26: { LogStep(26, "Wait 40ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + return WaitForMs(kIdentityAlpha, value); } case 27: { LogStep(27, "Check current saturation attribute value matched the value sent by the last command"); @@ -6254,8 +6319,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 28: { LogStep(28, "Wait 45ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + return WaitForMs(kIdentityAlpha, value); } case 29: { LogStep(29, "Check current saturation attribute value matched the value sent by the last command"); @@ -6263,8 +6329,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 30: { LogStep(30, "Wait 50ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + return WaitForMs(kIdentityAlpha, value); } case 31: { LogStep(31, "Check current saturation attribute value matched the value sent by the last command"); @@ -6281,8 +6348,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 33: { LogStep(33, "Wait 40ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + return WaitForMs(kIdentityAlpha, value); } case 34: { LogStep(34, "Check current saturation attribute value matched the value sent by the last command"); @@ -6290,8 +6358,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 35: { LogStep(35, "Wait 45ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + return WaitForMs(kIdentityAlpha, value); } case 36: { LogStep(36, "Check current saturation attribute value matched the value sent by the last command"); @@ -6299,8 +6368,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 37: { LogStep(37, "Wait 50ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + return WaitForMs(kIdentityAlpha, value); } case 38: { LogStep(38, "Check current saturation attribute value matched the value sent by the last command"); @@ -6317,8 +6387,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 40: { LogStep(40, "Wait 40ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + return WaitForMs(kIdentityAlpha, value); } case 41: { LogStep(41, "Check current saturation attribute value matched the value sent by the last command"); @@ -6326,8 +6397,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 42: { LogStep(42, "Wait 45ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + return WaitForMs(kIdentityAlpha, value); } case 43: { LogStep(43, "Check current saturation attribute value matched the value sent by the last command"); @@ -6335,8 +6407,9 @@ class Test_TC_CC_4_2Suite : public TestCommand } case 44: { LogStep(44, "Wait 50ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + return WaitForMs(kIdentityAlpha, value); } case 45: { LogStep(45, "Check current saturation attribute value matched the value sent by the last command"); @@ -6479,8 +6552,9 @@ class Test_TC_CC_4_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -6507,8 +6581,9 @@ class Test_TC_CC_4_3Suite : public TestCommand } case 5: { LogStep(5, "Wait 10ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Over TransitionTime,Read CurrentSaturation attribute from DUT"); @@ -6526,8 +6601,9 @@ class Test_TC_CC_4_3Suite : public TestCommand } case 8: { LogStep(8, "Wait 10ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + return WaitForMs(kIdentityAlpha, value); } case 9: { LogStep(9, "Over TransitionTime,Reads CurrentSaturation attribute from DUT"); @@ -6673,8 +6749,9 @@ class Test_TC_CC_4_4Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -6706,8 +6783,9 @@ class Test_TC_CC_4_4Suite : public TestCommand } case 6: { LogStep(6, "Wait 10ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "Check current hue attribute value matched the value sent by the last command"); @@ -6857,8 +6935,9 @@ class Test_TC_CC_5_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -6889,8 +6968,9 @@ class Test_TC_CC_5_1Suite : public TestCommand } case 6: { LogStep(6, "Wait 20ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(20); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 20UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "Check current x attribute value matched the value sent by the last command"); @@ -7063,8 +7143,9 @@ class Test_TC_CC_5_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -7094,8 +7175,9 @@ class Test_TC_CC_5_2Suite : public TestCommand } case 6: { LogStep(6, "Wait 150ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "Check current x attribute value matched the value sent by the last command"); @@ -7260,8 +7342,9 @@ class Test_TC_CC_5_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -7292,8 +7375,9 @@ class Test_TC_CC_5_3Suite : public TestCommand } case 6: { LogStep(6, "Wait 50ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "Check current x attribute value matched the value sent by the last command"); @@ -7423,8 +7507,9 @@ class Test_TC_CC_6_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -7451,8 +7536,9 @@ class Test_TC_CC_6_1Suite : public TestCommand } case 5: { LogStep(5, "Wait 10ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Read current color temprature"); @@ -7747,8 +7833,9 @@ class Test_TC_CC_6_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -7777,8 +7864,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 5: { LogStep(5, "Wait 90ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(90); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 90UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Read current color temprature attribute from DUT several times"); @@ -7786,8 +7874,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 7: { LogStep(7, "Wait 95ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(95); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 95UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "Read current color temprature attribute from DUT several times"); @@ -7795,8 +7884,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 9: { LogStep(9, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "Read current color temprature attribute from DUT several times"); @@ -7816,8 +7906,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 12: { LogStep(12, "Wait 190ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(190); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 190UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { LogStep(13, "Read current color temprature attribute from DUT several times"); @@ -7825,8 +7916,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 14: { LogStep(14, "Wait 195ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(195); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 195UL; + return WaitForMs(kIdentityAlpha, value); } case 15: { LogStep(15, "Read current color temprature attribute from DUT several times"); @@ -7834,8 +7926,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 16: { LogStep(16, "Wait 200ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(200); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 200UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { LogStep(17, "Read current color temprature attribute from DUT several times"); @@ -7867,8 +7960,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 20: { LogStep(20, "Wait 90ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(90); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 90UL; + return WaitForMs(kIdentityAlpha, value); } case 21: { LogStep(21, "Read current color temprature attribute from DUT several times"); @@ -7876,8 +7970,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 22: { LogStep(22, "Wait 95ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(95); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 95UL; + return WaitForMs(kIdentityAlpha, value); } case 23: { LogStep(23, "Read current color temprature attribute from DUT several times"); @@ -7885,8 +7980,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 24: { LogStep(24, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 25: { LogStep(25, "Read current color temprature attribute from DUT several times"); @@ -7918,8 +8014,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 28: { LogStep(28, "Wait 140ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(140); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 140UL; + return WaitForMs(kIdentityAlpha, value); } case 29: { LogStep(29, "Read current color temprature attribute from DUT several times"); @@ -7927,8 +8024,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 30: { LogStep(30, "Wait 145ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(145); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 145UL; + return WaitForMs(kIdentityAlpha, value); } case 31: { LogStep(31, "Read current color temprature attribute from DUT several times"); @@ -7936,8 +8034,9 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 32: { LogStep(32, "Wait 150ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(150); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 150UL; + return WaitForMs(kIdentityAlpha, value); } case 33: { LogStep(33, "Read current color temprature attribute from DUT several times"); @@ -8136,8 +8235,9 @@ class Test_TC_CC_6_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -8167,8 +8267,9 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 5: { LogStep(5, "Wait 40ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Read current color temprature"); @@ -8176,8 +8277,9 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 7: { LogStep(7, "Wait 45ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "Read current color temprature"); @@ -8185,8 +8287,9 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 9: { LogStep(9, "Wait 50ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "Read current color temprature"); @@ -8207,8 +8310,9 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 12: { LogStep(12, "Wait 40ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { LogStep(13, "Read current color temprature"); @@ -8216,8 +8320,9 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 14: { LogStep(14, "Wait 45ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + return WaitForMs(kIdentityAlpha, value); } case 15: { LogStep(15, "Read current color temprature"); @@ -8225,8 +8330,9 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 16: { LogStep(16, "Wait 50ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { LogStep(17, "Read current color temprature"); @@ -8518,8 +8624,9 @@ class Test_TC_CC_7_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -8559,8 +8666,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 6: { LogStep(6, "Wait 290ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8569,8 +8677,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 8: { LogStep(8, "Wait 295ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + return WaitForMs(kIdentityAlpha, value); } case 9: { LogStep(9, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8579,8 +8688,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 10: { LogStep(10, "Wait 300ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + return WaitForMs(kIdentityAlpha, value); } case 11: { LogStep(11, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8600,8 +8710,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 13: { LogStep(13, "Wait 290ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + return WaitForMs(kIdentityAlpha, value); } case 14: { LogStep(14, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8610,8 +8721,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 15: { LogStep(15, "Wait 295ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + return WaitForMs(kIdentityAlpha, value); } case 16: { LogStep(16, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8620,8 +8732,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 17: { LogStep(17, "Wait 300ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + return WaitForMs(kIdentityAlpha, value); } case 18: { LogStep(18, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8641,8 +8754,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 20: { LogStep(20, "Wait 290ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + return WaitForMs(kIdentityAlpha, value); } case 21: { LogStep(21, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8651,8 +8765,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 22: { LogStep(22, "Wait 295ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + return WaitForMs(kIdentityAlpha, value); } case 23: { LogStep(23, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8661,8 +8776,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 24: { LogStep(24, "Wait 300ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + return WaitForMs(kIdentityAlpha, value); } case 25: { LogStep(25, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8682,8 +8798,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 27: { LogStep(27, "Wait 290ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + return WaitForMs(kIdentityAlpha, value); } case 28: { LogStep(28, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8692,8 +8809,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 29: { LogStep(29, "Wait 295ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + return WaitForMs(kIdentityAlpha, value); } case 30: { LogStep(30, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8702,8 +8820,9 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 31: { LogStep(31, "Wait 300ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + return WaitForMs(kIdentityAlpha, value); } case 32: { LogStep(32, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8929,8 +9048,9 @@ class Test_TC_CC_7_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -8958,8 +9078,9 @@ class Test_TC_CC_7_2Suite : public TestCommand } case 5: { LogStep(5, "Wait 290ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(290); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 290UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8968,8 +9089,9 @@ class Test_TC_CC_7_2Suite : public TestCommand } case 7: { LogStep(7, "Wait 295ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(295); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 295UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -8978,8 +9100,9 @@ class Test_TC_CC_7_2Suite : public TestCommand } case 9: { LogStep(9, "Wait 300ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(300); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 300UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -9013,8 +9136,9 @@ class Test_TC_CC_7_2Suite : public TestCommand } case 14: { LogStep(14, "Wait 40ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(40); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40UL; + return WaitForMs(kIdentityAlpha, value); } case 15: { LogStep(15, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -9023,8 +9147,9 @@ class Test_TC_CC_7_2Suite : public TestCommand } case 16: { LogStep(16, "Wait 45ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(45); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 45UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { LogStep(17, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -9033,8 +9158,9 @@ class Test_TC_CC_7_2Suite : public TestCommand } case 18: { LogStep(18, "Wait 50ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(50); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 50UL; + return WaitForMs(kIdentityAlpha, value); } case 19: { LogStep(19, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -9193,8 +9319,9 @@ class Test_TC_CC_7_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -9223,8 +9350,9 @@ class Test_TC_CC_7_3Suite : public TestCommand } case 5: { LogStep(5, "Wait 10ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); @@ -9244,8 +9372,9 @@ class Test_TC_CC_7_3Suite : public TestCommand } case 8: { LogStep(8, "Wait 10ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + return WaitForMs(kIdentityAlpha, value); } case 9: { LogStep(9, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); @@ -9372,8 +9501,9 @@ class Test_TC_CC_7_4Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -9402,8 +9532,9 @@ class Test_TC_CC_7_4Suite : public TestCommand } case 5: { LogStep(5, "Wait 10ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); @@ -9733,8 +9864,9 @@ class Test_TC_CC_8_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn on light for color control tests"); @@ -9771,8 +9903,9 @@ class Test_TC_CC_8_1Suite : public TestCommand } case 7: { LogStep(7, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "Check current hue attribute value matched the value sent by the last attribute"); @@ -9804,8 +9937,9 @@ class Test_TC_CC_8_1Suite : public TestCommand } case 13: { LogStep(13, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 14: { LogStep(14, "Check Saturation attribute value matched the value sent by the last attribute"); @@ -9845,8 +9979,9 @@ class Test_TC_CC_8_1Suite : public TestCommand } case 21: { LogStep(21, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 22: { LogStep(22, "Check current x attribute value matched the value sent by the last attribute"); @@ -9885,8 +10020,9 @@ class Test_TC_CC_8_1Suite : public TestCommand } case 28: { LogStep(28, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 29: { LogStep(29, "Reads current color attribute value matched the value sent by the last attribute"); @@ -9921,8 +10057,9 @@ class Test_TC_CC_8_1Suite : public TestCommand } case 34: { LogStep(34, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 35: { LogStep(35, "Check EnhancedCurrentHue attribute value matched the value sent by the last attribute"); @@ -10347,8 +10484,9 @@ class Test_TC_CC_9_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Precondition : Turn on light for color control tests"); @@ -10586,8 +10724,9 @@ class Test_TC_CC_9_1Suite : public TestCommand } case 30: { LogStep(30, "Wait 2000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); } case 31: { LogStep(31, "Read EnhancedCurrentHue attribute from DUT"); @@ -10951,8 +11090,9 @@ class Test_TC_CC_9_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Precondition: Turn on light for color control tests"); @@ -11275,8 +11415,9 @@ class Test_TC_CC_9_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Precondition: Turn on light for color control tests"); @@ -11674,8 +11815,9 @@ class Test_TC_DM_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Query Data Model Revision"); @@ -11842,8 +11984,9 @@ class Test_TC_DM_3_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Query MaxNetworks"); @@ -11959,8 +12102,9 @@ class Test_TC_DM_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Query fabrics list"); @@ -12079,8 +12223,9 @@ class Test_TC_EMR_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -12246,8 +12391,9 @@ class Test_TC_ETHDIAG_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read PHYRate attribute constraints"); @@ -12357,8 +12503,9 @@ class Test_TC_ETHDIAG_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -12481,8 +12628,9 @@ class Test_TC_FLW_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -12515,8 +12663,11 @@ class Test_TC_FLW_1_1Suite : public TestCommand LogStep(6, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 7: { LogStep(7, "Read the global attribute: AcceptedCommandList"); @@ -12533,8 +12684,11 @@ class Test_TC_FLW_1_1Suite : public TestCommand "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " "the value 0"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter '0' for success", "0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -12696,8 +12850,9 @@ class Test_TC_FLW_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the mandatory attribute: MeasuredValue"); @@ -12850,8 +13005,9 @@ class Test_TC_FLW_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the mandatory attribute: MeasuredValue"); @@ -12962,8 +13118,9 @@ class Test_TC_GC_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "TH1 reads the BreadCrumb Attribute from the DUT"); @@ -13134,8 +13291,9 @@ class Test_TC_I_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "TH reads the ClusterRevision attribute from the DUT"); @@ -13161,16 +13319,22 @@ class Test_TC_I_1_1Suite : public TestCommand LogStep(6, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 7: { LogStep(7, "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " "the value 0"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter '0' for success", "0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -13252,8 +13416,9 @@ class Test_TC_I_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "TH reads the IdentifyTime attribute from the DUT"); @@ -13395,8 +13560,9 @@ class Test_TC_I_2_3Suite : public TestCommand { case 0: { LogStep(0, "1.Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, @@ -13409,8 +13575,9 @@ class Test_TC_I_2_3Suite : public TestCommand } case 2: { LogStep(2, "Manually check DUT executes a blink effect"); - SetIdentity(kIdentityAlpha); - return UserPrompt("DUT executes a blink effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a blink effectgarbage: not in length on purpose", 27); + return UserPrompt(kIdentityAlpha, value); } case 3: { LogStep(3, @@ -13423,8 +13590,9 @@ class Test_TC_I_2_3Suite : public TestCommand } case 4: { LogStep(4, "check DUT executes a breathe effect"); - SetIdentity(kIdentityAlpha); - return UserPrompt("DUT executes a breathe effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, @@ -13437,8 +13605,9 @@ class Test_TC_I_2_3Suite : public TestCommand } case 6: { LogStep(6, "check DUT executes an okay effect"); - SetIdentity(kIdentityAlpha); - return UserPrompt("DUT executes an okay effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes an okay effectgarbage: not in length on purpose", 27); + return UserPrompt(kIdentityAlpha, value); } case 7: { LogStep(7, @@ -13451,8 +13620,9 @@ class Test_TC_I_2_3Suite : public TestCommand } case 8: { LogStep(8, "check DUT executes a channel change effect"); - SetIdentity(kIdentityAlpha); - return UserPrompt("DUT executes a channel change effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a channel change effectgarbage: not in length on purpose", 36); + return UserPrompt(kIdentityAlpha, value); } case 9: { LogStep(9, @@ -13465,8 +13635,9 @@ class Test_TC_I_2_3Suite : public TestCommand } case 10: { LogStep(10, "check DUT executes a breathe effect"); - SetIdentity(kIdentityAlpha); - return UserPrompt("DUT executes a breathe effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); + return UserPrompt(kIdentityAlpha, value); } case 11: { LogStep(11, @@ -13479,8 +13650,10 @@ class Test_TC_I_2_3Suite : public TestCommand } case 12: { LogStep(12, "Manually check DUT stops the breathe effect after the current effect sequence"); - SetIdentity(kIdentityAlpha); - return UserPrompt("DUT stops the breathe effect after the current effect sequence"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "DUT stops the breathe effect after the current effect sequencegarbage: not in length on purpose", 62); + return UserPrompt(kIdentityAlpha, value); } case 13: { LogStep(13, @@ -13493,8 +13666,9 @@ class Test_TC_I_2_3Suite : public TestCommand } case 14: { LogStep(14, "Manually check DUT executes a breathe effect"); - SetIdentity(kIdentityAlpha); - return UserPrompt("DUT executes a breathe effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); + return UserPrompt(kIdentityAlpha, value); } case 15: { LogStep(15, @@ -13507,8 +13681,10 @@ class Test_TC_I_2_3Suite : public TestCommand } case 16: { LogStep(16, "Check DUT stops the breathe effect as soon as possible."); - SetIdentity(kIdentityAlpha); - return UserPrompt("DUT stops the breathe effect as soon as possible"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("DUT stops the breathe effect as soon as possiblegarbage: not in length on purpose", 48); + return UserPrompt(kIdentityAlpha, value); } case 17: { LogStep(17, @@ -13521,8 +13697,9 @@ class Test_TC_I_2_3Suite : public TestCommand } case 18: { LogStep(18, "Check DUT executes a blink effect."); - SetIdentity(kIdentityAlpha); - return UserPrompt("DUT executes a blink effect"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a blink effectgarbage: not in length on purpose", 27); + return UserPrompt(kIdentityAlpha, value); } case 19: { LogStep(19, @@ -13535,8 +13712,10 @@ class Test_TC_I_2_3Suite : public TestCommand } case 20: { LogStep(20, "Check DUT stops any effect that may be still running as soon as possible"); - SetIdentity(kIdentityAlpha); - return UserPrompt("DUT stops any effect that may be still running as soon as possible"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "DUT stops any effect that may be still running as soon as possiblegarbage: not in length on purpose", 66); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -13678,8 +13857,9 @@ class Test_TC_ILL_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -13700,8 +13880,11 @@ class Test_TC_ILL_1_1Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -13718,8 +13901,11 @@ class Test_TC_ILL_1_1Suite : public TestCommand "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap attribute has " "the value 0"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter '0' for success", "0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -13821,8 +14007,9 @@ class Test_TC_ILL_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "TH reads MinMeasuredValue attribute from DUT"); @@ -14002,8 +14189,9 @@ class Test_TC_LVL_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -14022,8 +14210,11 @@ class Test_TC_LVL_1_1Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -14215,8 +14406,9 @@ class Test_TC_LVL_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reset level to 254"); @@ -14229,8 +14421,9 @@ class Test_TC_LVL_2_1Suite : public TestCommand } case 2: { LogStep(2, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { LogStep(3, "Reads the CurrentLevel attribute"); @@ -14446,8 +14639,9 @@ class Test_TC_LVL_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads the OnOffTransitionTime attribute from the DUT"); @@ -14683,8 +14877,9 @@ class Test_TC_LVL_3_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "reads CurrentLevel attribute from DUT"); @@ -14709,8 +14904,9 @@ class Test_TC_LVL_3_1Suite : public TestCommand } case 5: { LogStep(5, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "reads CurrentLevel attribute from DUT"); @@ -14727,8 +14923,9 @@ class Test_TC_LVL_3_1Suite : public TestCommand } case 8: { LogStep(8, "Wait 11000 second"); - SetIdentity(kIdentityAlpha); - return WaitForMs(11000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 11000UL; + return WaitForMs(kIdentityAlpha, value); } case 9: { LogStep(9, "reads CurrentLevel attribute from DUT"); @@ -14750,8 +14947,9 @@ class Test_TC_LVL_3_1Suite : public TestCommand } case 12: { LogStep(12, "Wait 1000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { LogStep(13, "reads CurrentLevel attribute from DUT"); @@ -14768,8 +14966,9 @@ class Test_TC_LVL_3_1Suite : public TestCommand } case 15: { LogStep(15, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -14930,8 +15129,9 @@ class Test_TC_LVL_4_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "reads max level attribute from DUT"); @@ -14948,14 +15148,18 @@ class Test_TC_LVL_4_1Suite : public TestCommand } case 3: { LogStep(3, "user prompt message"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the DUT moves at a rate of 32 units per second or as close as possible to " - "this rate and completes moving to its maximum level"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Physically verify that the DUT moves at a rate of 32 units per second or as close as possible to this rate and " + "completes moving to its maximum levelgarbage: not in length on purpose", + 148); + return UserPrompt(kIdentityAlpha, value); } case 4: { LogStep(4, "Wait 3000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { LogStep(5, "reads CurrentLevel attribute from DUT"); @@ -14976,14 +15180,18 @@ class Test_TC_LVL_4_1Suite : public TestCommand } case 8: { LogStep(8, "user prompt message"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the DUT moves at a rate of 64 units per second or as close as possible to " - "this rate and complete moving to its minimum level"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Physically verify that the DUT moves at a rate of 64 units per second or as close as possible to this rate and " + "complete moving to its minimum levelgarbage: not in length on purpose", + 147); + return UserPrompt(kIdentityAlpha, value); } case 9: { LogStep(9, "Wait 5000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(5000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "reads CurrentLevel attribute from DUT"); @@ -15004,8 +15212,9 @@ class Test_TC_LVL_4_1Suite : public TestCommand } case 13: { LogStep(13, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 14: { LogStep(14, "reads CurrentLevel attribute from DUT"); @@ -15013,9 +15222,11 @@ class Test_TC_LVL_4_1Suite : public TestCommand } case 15: { LogStep(15, "user prompt message"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the device moves at the rate recorded in step 3a and completes moving to its " - "maximum level."); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Physically verify that the device moves at the rate recorded in step 3a and " + "completes moving to its maximum level.garbage: not in length on purpose", + 114); + return UserPrompt(kIdentityAlpha, value); } case 16: { LogStep(16, "Reset level to 254"); @@ -15028,8 +15239,9 @@ class Test_TC_LVL_4_1Suite : public TestCommand } case 17: { LogStep(17, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -15154,8 +15366,9 @@ class Test_TC_LVL_5_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Sending on command"); @@ -15174,8 +15387,9 @@ class Test_TC_LVL_5_1Suite : public TestCommand } case 3: { LogStep(3, "Wait 3000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { LogStep(4, "Reads current level attribute from DUT"); @@ -15193,8 +15407,9 @@ class Test_TC_LVL_5_1Suite : public TestCommand } case 6: { LogStep(6, "Wait 5000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(5000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "Reads current level attribute from DUT"); @@ -15212,8 +15427,9 @@ class Test_TC_LVL_5_1Suite : public TestCommand } case 9: { LogStep(9, "Wait 4000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(4000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 4000UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "Reads current level attribute from DUT"); @@ -15230,8 +15446,9 @@ class Test_TC_LVL_5_1Suite : public TestCommand } case 12: { LogStep(12, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { LogStep(13, "Sending off command"); @@ -15350,8 +15567,9 @@ class Test_TC_LVL_6_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Sending on command"); @@ -15369,8 +15587,9 @@ class Test_TC_LVL_6_1Suite : public TestCommand } case 3: { LogStep(3, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { LogStep(4, "Reads CurrentLevel attribute from DUT"); @@ -15387,8 +15606,9 @@ class Test_TC_LVL_6_1Suite : public TestCommand } case 6: { LogStep(6, "Wait 2000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "Sends stop command to DUT"); @@ -15412,8 +15632,9 @@ class Test_TC_LVL_6_1Suite : public TestCommand } case 10: { LogStep(10, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 11: { LogStep(11, "Sending off command"); @@ -15545,8 +15766,9 @@ class Test_TC_MC_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -15560,8 +15782,11 @@ class Test_TC_MC_1_1Suite : public TestCommand LogStep(3, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); @@ -15576,8 +15801,11 @@ class Test_TC_MC_1_1Suite : public TestCommand "Read FeatureMap attribute from the DUT and Verify that the DUT response indicates either value 0 or throws a " "general error if the attribute is not supported"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -15715,8 +15943,9 @@ class Test_TC_MC_1_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -15735,8 +15964,11 @@ class Test_TC_MC_1_2Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -15751,8 +15983,11 @@ class Test_TC_MC_1_2Suite : public TestCommand case 7: { LogStep(7, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -15898,8 +16133,9 @@ class Test_TC_MC_1_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -15921,8 +16157,11 @@ class Test_TC_MC_1_3Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -15941,8 +16180,11 @@ class Test_TC_MC_1_3Suite : public TestCommand "Read attribute Feature map and verify that DUT response indicates that the FeatureMap attribute has bit 0 set " "to 1 if the DUT supports the Application Platform feature (PICS_AP_S is true)."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -16088,8 +16330,9 @@ class Test_TC_MC_1_4Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -16108,8 +16351,11 @@ class Test_TC_MC_1_4Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -16124,8 +16370,11 @@ class Test_TC_MC_1_4Suite : public TestCommand "Read attribute Feature map and Verify that the DUT response indicates that the FeatureMap attribute has bit 0 " "set to 1 if the DUT supports the Name Updates feature PICS_NU_S is true"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -16261,8 +16510,9 @@ class Test_TC_MC_1_5Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -16281,8 +16531,11 @@ class Test_TC_MC_1_5Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -16295,8 +16548,11 @@ class Test_TC_MC_1_5Suite : public TestCommand case 7: { LogStep(7, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -16428,8 +16684,9 @@ class Test_TC_MC_1_6Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -16448,8 +16705,11 @@ class Test_TC_MC_1_6Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -16467,8 +16727,11 @@ class Test_TC_MC_1_6Suite : public TestCommand "Bit 0 - Set to 1 if the DUT supports Channel Lists (PICS_CL_S is true) Bit 1 - Set to 1 if the DUT supports " "Lineup Info (PICS_LI_S is true)"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -16636,8 +16899,9 @@ class Test_TC_MC_1_7Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -16670,8 +16934,11 @@ class Test_TC_MC_1_7Suite : public TestCommand "Set to 1 if the DUT supports Advanced Seek (PICS_ADVANCEDSEEK is true) Bit 1 - Set to 1 if the DUT supports " "Variable Speed (PICS_VARIABLESPEED is true)"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -16813,8 +17080,9 @@ class Test_TC_MC_1_8Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -16833,8 +17101,11 @@ class Test_TC_MC_1_8Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -16852,8 +17123,11 @@ class Test_TC_MC_1_8Suite : public TestCommand "Read FeatureMap attribute from the DUT and Verify that the DUT has bit 1 set to 1 if the device supports Name " "Updates PICS_NAMEUPDATES is true"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -16993,8 +17267,9 @@ class Test_TC_MC_1_9Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -17016,8 +17291,11 @@ class Test_TC_MC_1_9Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -17035,8 +17313,11 @@ class Test_TC_MC_1_9Suite : public TestCommand "Read FeatureMap attribute from the DUT and verify response has the value 0 or throws a general error if the " "attribute is not supported.."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -17190,8 +17471,9 @@ class Test_TC_MC_1_10Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -17213,8 +17495,11 @@ class Test_TC_MC_1_10Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -17233,8 +17518,11 @@ class Test_TC_MC_1_10Suite : public TestCommand "Read FeatureMap attribute from the DUT and verify response has the value 0 or throws a general error if the " "attribute is not supported.."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -17374,8 +17662,9 @@ class Test_TC_MC_1_11Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -17397,8 +17686,11 @@ class Test_TC_MC_1_11Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -17418,8 +17710,11 @@ class Test_TC_MC_1_11Suite : public TestCommand "supports Content Search (PICS_CONTENTSEARCH is true) Bit 1 - Set to 1 if the DUT supports URL Playback " "(PICS_URLPLAYBACK is true)"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -17559,8 +17854,9 @@ class Test_TC_MC_1_12Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -17578,8 +17874,11 @@ class Test_TC_MC_1_12Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -17596,8 +17895,11 @@ class Test_TC_MC_1_12Suite : public TestCommand case 7: { LogStep(7, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -17664,8 +17966,9 @@ class Test_TC_MC_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Put the device into low power mode"); @@ -17835,8 +18138,9 @@ class Test_TC_MC_3_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send Select"); @@ -18019,8 +18323,9 @@ class Test_TC_MC_3_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send RootMenu"); @@ -18161,8 +18466,9 @@ class Test_TC_MC_3_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send Numbers1"); @@ -18359,8 +18665,9 @@ class Test_TC_MC_3_4Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send RootMenu"); @@ -18502,8 +18809,9 @@ class Test_TC_MC_3_5Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read CatalogList attribute."); @@ -18572,8 +18880,9 @@ class Test_TC_MC_3_6Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -18637,8 +18946,9 @@ class Test_TC_MC_3_7Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -18702,8 +19012,9 @@ class Test_TC_MC_3_8Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -18767,8 +19078,9 @@ class Test_TC_MC_3_9Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -18832,8 +19144,9 @@ class Test_TC_MC_3_10Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -18897,8 +19210,9 @@ class Test_TC_MC_3_11Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -18970,8 +19284,9 @@ class Test_TC_MC_5_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads the ChannelList attribute from the DUT"); @@ -19043,13 +19358,16 @@ class Test_TC_MC_5_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("verify that the channel has changed on the device."); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("verify that the channel has changed on the device.garbage: not in length on purpose", 50); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -19117,13 +19435,16 @@ class Test_TC_MC_5_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("verify that the channel has changed on the device"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("verify that the channel has changed on the devicegarbage: not in length on purpose", 49); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -19211,18 +19532,22 @@ class Test_TC_MC_6_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that media is paused"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the media is playing"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Physically verify that the media is playinggarbage: not in length on purpose", 43); + return UserPrompt(kIdentityAlpha, value); } case 3: { LogStep(3, "Reads the playback state attribute"); @@ -19230,13 +19555,17 @@ class Test_TC_MC_6_1Suite : public TestCommand } case 4: { LogStep(4, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the media is paused"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Physically verify that the media is pausedgarbage: not in length on purpose", 42); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the media is stoped"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Physically verify that the media is stopedgarbage: not in length on purpose", 42); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -19336,18 +19665,22 @@ class Test_TC_MC_6_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that media is paused"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the media is playing"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Physically verify that the media is playinggarbage: not in length on purpose", 43); + return UserPrompt(kIdentityAlpha, value); } case 3: { LogStep(3, "Reads the CurrentState attribute"); @@ -19355,28 +19688,38 @@ class Test_TC_MC_6_2Suite : public TestCommand } case 4: { LogStep(4, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Physically verify that the media is started over"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Physically verify that the media is started overgarbage: not in length on purpose", 48); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the next media item in the queue has been loaded"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Verify that the next media item in the queue has been loadedgarbage: not in length on purpose", 60); + return UserPrompt(kIdentityAlpha, value); } case 6: { LogStep(6, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the previous media item in the queue has been loaded"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Verify that the previous media item in the queue has been loadedgarbage: not in length on purpose", 64); + return UserPrompt(kIdentityAlpha, value); } case 7: { LogStep(7, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media has skipped forward 10 seconds"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Verify that the media has skipped forward 10 secondsgarbage: not in length on purpose", 52); + return UserPrompt(kIdentityAlpha, value); } case 8: { LogStep(8, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media has skipped backward 10 seconds"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Verify that the media has skipped backward 10 secondsgarbage: not in length on purpose", 53); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -19452,23 +19795,29 @@ class Test_TC_MC_6_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that media is paused"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media has moved to 10 seconds from the starting point."); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Verify that the media has moved to 10 seconds from the starting point.garbage: not in length on purpose", 70); + return UserPrompt(kIdentityAlpha, value); } case 3: { LogStep(3, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("User prompt needed to enter the value beyond the furthest valid position"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "User prompt needed to enter the value beyond the furthest valid positiongarbage: not in length on purpose", 72); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -19580,13 +19929,15 @@ class Test_TC_MC_6_4Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that media is paused"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Verify that media is pausedgarbage: not in length on purpose", 27); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "Reads the PlaybackSpeed attribute from the DUT"); @@ -19594,8 +19945,9 @@ class Test_TC_MC_6_4Suite : public TestCommand } case 3: { LogStep(3, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media is playing"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Verify that the media is playinggarbage: not in length on purpose", 32); + return UserPrompt(kIdentityAlpha, value); } case 4: { LogStep(4, "Reads the CurrentState attribute"); @@ -19603,13 +19955,17 @@ class Test_TC_MC_6_4Suite : public TestCommand } case 5: { LogStep(5, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media play speed has increased"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Verify that the media play speed has increasedgarbage: not in length on purpose", 46); + return UserPrompt(kIdentityAlpha, value); } case 6: { LogStep(6, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media play has reversed direction"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Verify that the media play has reversed directiongarbage: not in length on purpose", 49); + return UserPrompt(kIdentityAlpha, value); } case 7: { LogStep(7, "Reads the CurrentState attribute"); @@ -19617,13 +19973,17 @@ class Test_TC_MC_6_4Suite : public TestCommand } case 8: { LogStep(8, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media play has reversed direction"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Verify that the media play has reversed directiongarbage: not in length on purpose", 49); + return UserPrompt(kIdentityAlpha, value); } case 9: { LogStep(9, "log a command"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Verify that the media is has resumed playing forward at the default speed"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Verify that the media is has resumed playing forward at the default speedgarbage: not in length on purpose", 73); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -19687,8 +20047,9 @@ class Test_TC_MC_7_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -19752,8 +20113,9 @@ class Test_TC_MC_7_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -19833,8 +20195,9 @@ class Test_TC_MC_8_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads the CurrentTarget attribute"); @@ -19962,13 +20325,16 @@ class Test_TC_MC_9_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Precondition"); - SetIdentity(kIdentityAlpha); - return Log("DUT has one or more Content Apps available"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = + chip::Span("DUT has one or more Content Apps availablegarbage: not in length on purpose", 42); + return Log(kIdentityAlpha, value); } case 2: { LogStep(2, "Reads the VendorName attribute"); @@ -20075,8 +20441,9 @@ class Test_TC_MC_10_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "TH reads the AcceptHeader attribute from the DUT"); @@ -20183,8 +20550,9 @@ class Test_TC_MOD_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "TH reads the ClusterRevision attribute from the DUT"); @@ -20360,18 +20728,21 @@ class Test_TC_MF_1_3Suite : public TestCommand { case 0: { LogStep(0, "Stop target device"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 1: { LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); - SetIdentity(kIdentityAlpha); - return Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); } case 2: { LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 3: { LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); @@ -20402,15 +20773,16 @@ class Test_TC_MF_1_3Suite : public TestCommand } case 6: { LogStep(6, "Commission from beta"); - SetIdentity(kIdentityBeta); - return PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:0000000000I31506010")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); + return PairWithQRCode(kIdentityBeta, value); } case 7: { LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityBeta); - return WaitForCommissionee(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 8: { LogStep(8, "Query fabrics list"); @@ -20595,18 +20967,21 @@ class Test_TC_MF_1_4Suite : public TestCommand { case 0: { LogStep(0, "Stop target device"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 1: { LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); - SetIdentity(kIdentityAlpha); - return Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); } case 2: { LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 3: { LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); @@ -20628,15 +21003,16 @@ class Test_TC_MF_1_4Suite : public TestCommand } case 6: { LogStep(6, "Commission from beta"); - SetIdentity(kIdentityBeta); - return PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityBeta, value); } case 7: { LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityBeta); - return WaitForCommissionee(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 8: { LogStep(8, "Query fabrics list"); @@ -20793,13 +21169,14 @@ class Test_TC_MF_1_5Suite : public TestCommand { case 0: { LogStep(0, "Reboot target device"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 1: { LogStep(1, "TH_CR1 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 2: { LogStep(2, "TH_CR1 opens a new commissioning window on DUT_CE"); @@ -20820,30 +21197,34 @@ class Test_TC_MF_1_5Suite : public TestCommand } case 3: { LogStep(3, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { LogStep(4, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { LogStep(5, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Wait for PIXIT_COMM_WIN(180) + 10 seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(28000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 28000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityBeta); - return PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityBeta, value); } case 8: { LogStep(8, "TH_CR1 opens a new commissioning window on DUT_CE"); @@ -20871,10 +21252,10 @@ class Test_TC_MF_1_5Suite : public TestCommand } case 10: { LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityBeta); - return PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityBeta, value); } case 11: { LogStep(11, "TH_CR1 revokes the commissioning window on DUT_CE"); @@ -20912,10 +21293,10 @@ class Test_TC_MF_1_5Suite : public TestCommand } case 15: { LogStep(15, "TH_CR3 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityGamma); - return PairWithQRCode(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityGamma, value); } } return CHIP_NO_ERROR; @@ -21054,18 +21435,21 @@ class Test_TC_MF_1_6Suite : public TestCommand { case 0: { LogStep(0, "Stop target device"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 1: { LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); - SetIdentity(kIdentityAlpha); - return Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); } case 2: { LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 3: { LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); @@ -21077,30 +21461,34 @@ class Test_TC_MF_1_6Suite : public TestCommand } case 4: { LogStep(4, "Wait for PIXIT_COMM_WIN(180) + 10"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { LogStep(5, "Wait for PIXIT_COMM_WIN(180) + 10"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "Wait for PIXIT_COMM_WIN(180) + 10"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "Wait for PIXIT_COMM_WIN(180) + 10"); - SetIdentity(kIdentityAlpha); - return WaitForMs(28000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 28000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "Commission from beta"); - SetIdentity(kIdentityBeta); - return PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityBeta, value); } case 9: { LogStep(9, "TH_CR1 opens a commissioning window on DUT_CE"); @@ -21119,10 +21507,10 @@ class Test_TC_MF_1_6Suite : public TestCommand } case 11: { LogStep(11, "Commission from beta"); - SetIdentity(kIdentityBeta); - return PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityBeta, value); } case 12: { LogStep(12, "TH_CR1 revokes the commissioning window on DUT_CE"); @@ -21151,22 +21539,23 @@ class Test_TC_MF_1_6Suite : public TestCommand } case 16: { LogStep(16, "Commission from beta"); - SetIdentity(kIdentityBeta); - return PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityBeta, value); } case 17: { LogStep(17, "TH_CR2 starts a commissioning process on DUT_CE"); - SetIdentity(kIdentityBeta); - return WaitForCommissionee(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 18: { LogStep(18, "TH_CR3 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityGamma); - return PairWithQRCode(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityGamma, value); } } return CHIP_NO_ERROR; @@ -21351,13 +21740,14 @@ class Test_TC_MF_1_15Suite : public TestCommand { case 0: { LogStep(0, "Reboot target device"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 1: { LogStep(1, "TH_CR1 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 2: { LogStep(2, "TH_CR1 opens a commissioning window on DUT_CE"); @@ -21369,15 +21759,16 @@ class Test_TC_MF_1_15Suite : public TestCommand } case 3: { LogStep(3, "Commission from gamma"); - SetIdentity(kIdentityGamma); - return PairWithQRCode(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityGamma, value); } case 4: { LogStep(4, "TH_CR3 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityGamma); - return WaitForCommissionee(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + return WaitForCommissionee(kIdentityGamma, value); } case 5: { LogStep(5, "TH_CR1 opens a commissioning window on DUT_CE"); @@ -21389,15 +21780,16 @@ class Test_TC_MF_1_15Suite : public TestCommand } case 6: { LogStep(6, "Commission from beta"); - SetIdentity(kIdentityBeta); - return PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityBeta, value); } case 7: { LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE"); - SetIdentity(kIdentityBeta); - return WaitForCommissionee(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 8: { LogStep(8, "TH_CR1 opens a commissioning window on DUT_CE"); @@ -21431,23 +21823,27 @@ class Test_TC_MF_1_15Suite : public TestCommand } case 11: { LogStep(11, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 12: { LogStep(12, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { LogStep(13, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 14: { LogStep(14, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(18000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 18000UL; + return WaitForMs(kIdentityAlpha, value); } case 15: { LogStep(15, "TH_CR1 re-opens new commissioning window on DUT_CE"); @@ -21490,23 +21886,27 @@ class Test_TC_MF_1_15Suite : public TestCommand } case 18: { LogStep(18, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 19: { LogStep(19, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 20: { LogStep(20, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(54000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 54000UL; + return WaitForMs(kIdentityAlpha, value); } case 21: { LogStep(21, "Wait for the expiration of PIXIT_COMM_WIN seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(18000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 18000UL; + return WaitForMs(kIdentityAlpha, value); } case 22: { LogStep(22, "TH_CR1 opens a new commissioning window on DUT_CE"); @@ -21663,8 +22063,9 @@ class Test_TC_OCC_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -21697,8 +22098,11 @@ class Test_TC_OCC_1_1Suite : public TestCommand LogStep(6, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 7: { LogStep(7, "Read the global attribute: AcceptedCommandList"); @@ -21713,8 +22117,11 @@ class Test_TC_OCC_1_1Suite : public TestCommand case 9: { LogStep(9, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter '0' for success", "0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -21841,8 +22248,9 @@ class Test_TC_OCC_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads mandatory attribute constrains: Occupancy"); @@ -21974,8 +22382,9 @@ class Test_TC_OCC_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads Occupancy attribute from DUT"); @@ -22129,8 +22538,9 @@ class Test_TC_OO_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -22145,8 +22555,11 @@ class Test_TC_OO_1_1Suite : public TestCommand LogStep(3, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); @@ -22280,8 +22693,9 @@ class Test_TC_OO_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the mandatory attribute: OnOff"); @@ -22469,8 +22883,9 @@ class Test_TC_OO_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send Off Command"); @@ -22524,8 +22939,9 @@ class Test_TC_OO_2_2Suite : public TestCommand } case 12: { LogStep(12, "Wait 1000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { LogStep(13, "Check on/off attribute value is true after toggle command"); @@ -22538,8 +22954,9 @@ class Test_TC_OO_2_2Suite : public TestCommand } case 15: { LogStep(15, "Wait 1000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 16: { LogStep(16, "Check on/off attribute value is false after toggle command"); @@ -22547,13 +22964,17 @@ class Test_TC_OO_2_2Suite : public TestCommand } case 17: { LogStep(17, "User prompt Set OnOff attribute manually to on"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operate on device to set OnOff attribute manually to on"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Operate on device to set OnOff attribute manually to ongarbage: not in length on purpose", 55); + return UserPrompt(kIdentityAlpha, value); } case 18: { LogStep(18, "User prompt Set OnOff attribute manually to off"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operate on device to set OnOff attribute manually to off"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Operate on device to set OnOff attribute manually to offgarbage: not in length on purpose", 56); + return UserPrompt(kIdentityAlpha, value); } case 19: { LogStep(19, "Reset Off Command"); @@ -22932,8 +23353,9 @@ class Test_TC_OO_2_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send On Command"); @@ -22943,8 +23365,9 @@ class Test_TC_OO_2_3Suite : public TestCommand } case 2: { LogStep(2, "Wait 1000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { LogStep(3, "Reads OnOff attribute from DUT"); @@ -22964,8 +23387,9 @@ class Test_TC_OO_2_3Suite : public TestCommand } case 6: { LogStep(6, "Wait 1000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "Reads OnOff attribute from DUT"); @@ -22985,8 +23409,9 @@ class Test_TC_OO_2_3Suite : public TestCommand } case 10: { LogStep(10, "Wait 1000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 11: { LogStep(11, "Reads OnOff attribute from DUT"); @@ -23360,8 +23785,9 @@ class Test_TC_OO_2_4Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "TH sends On command to DUT"); @@ -23381,13 +23807,14 @@ class Test_TC_OO_2_4Suite : public TestCommand } case 4: { LogStep(4, "Power off DUT"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 5: { LogStep(5, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 6: { LogStep(6, "TH reads the OnOff attribute from the DUT"); @@ -23402,13 +23829,14 @@ class Test_TC_OO_2_4Suite : public TestCommand } case 8: { LogStep(8, "Power off DUT"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 9: { LogStep(9, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 10: { LogStep(10, "TH reads the OnOff attribute from the DUT"); @@ -23423,13 +23851,14 @@ class Test_TC_OO_2_4Suite : public TestCommand } case 12: { LogStep(12, "Power off DUT"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 13: { LogStep(13, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 14: { LogStep(14, "TH reads the OnOff attribute from the DUT"); @@ -23437,13 +23866,14 @@ class Test_TC_OO_2_4Suite : public TestCommand } case 15: { LogStep(15, "Power off DUT"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 16: { LogStep(16, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 17: { LogStep(17, "TH reads the OnOff attribute from the DUT"); @@ -23457,13 +23887,14 @@ class Test_TC_OO_2_4Suite : public TestCommand } case 19: { LogStep(19, "Power off DUT"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 20: { LogStep(20, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 21: { LogStep(21, "TH reads the OnOff attribute from the DUT"); @@ -23476,13 +23907,14 @@ class Test_TC_OO_2_4Suite : public TestCommand } case 23: { LogStep(23, "Power off DUT"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 24: { LogStep(24, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 25: { LogStep(25, "TH reads the OnOff attribute from the DUT"); @@ -23636,8 +24068,9 @@ class Test_TC_PS_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the global attribute: ClusterRevision"); @@ -23656,8 +24089,11 @@ class Test_TC_PS_1_1Suite : public TestCommand LogStep(4, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); @@ -23770,8 +24206,9 @@ class Test_TC_PS_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Test Harness Client reads Status attribute from Server DUT"); @@ -23902,8 +24339,9 @@ class Test_TC_PRS_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read the global attribute: ClusterRevision"); @@ -23936,26 +24374,38 @@ class Test_TC_PRS_1_1Suite : public TestCommand LogStep(6, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 7: { LogStep(7, "Read AcceptedCommandList attribute from the DUT and Verify that the DUT response"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 8: { LogStep(8, "Read GeneratedCommandList attribute from the DUT and Verify that the DUT response"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 9: { LogStep(9, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter '0' for success", "0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -24079,8 +24529,9 @@ class Test_TC_PRS_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read the mandatory attribute constraints: MeasuredValue"); @@ -24261,8 +24712,9 @@ class Test_TC_PCC_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read the global attribute constraints: ClusterRevision"); @@ -24916,8 +25368,9 @@ class Test_TC_PCC_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the mandatory attribute: MaxPressure"); @@ -25262,8 +25715,9 @@ class Test_TC_PCC_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Write 1 to the OperationMode attribute to DUT: OperationMode"); @@ -25446,8 +25900,9 @@ class Test_TC_PCC_2_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Write 0 to the OperationMode attribute to DUT"); @@ -25681,8 +26136,9 @@ class Test_TC_PCC_2_4Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Write 1 to the LifetimeRunningHours attribute to DUT"); @@ -25856,8 +26312,9 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand { case 0: { LogStep(0, "Commission DUT to TH"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "TH reads the ClusterRevision attribute from the DUT"); @@ -25995,16 +26452,20 @@ class Test_TC_RH_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read ClusterRevision attribute from the DUT and Verify that the DUT response indicates ClusterRevision " "attribute has the value 3"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Enter the Value", "3"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter the Valuegarbage: not in length on purpose", 15); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("3garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "Read the global attribute: AttributeList"); @@ -26016,8 +26477,11 @@ class Test_TC_RH_1_1Suite : public TestCommand LogStep(3, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); @@ -26032,8 +26496,11 @@ class Test_TC_RH_1_1Suite : public TestCommand case 6: { LogStep(6, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter FeatureMap attribute value", "0"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter FeatureMap attribute valuegarbage: not in length on purpose", 39); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -26141,8 +26608,9 @@ class Test_TC_RH_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads constraints of attribute: MeasuredValue"); @@ -26255,8 +26723,9 @@ class Test_TC_RH_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads constraints of attribute: MinMeasuredValue"); @@ -26543,18 +27012,21 @@ class Test_TC_SC_4_2Suite : public TestCommand { case 0: { LogStep(0, "Stop target device"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 1: { LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); - SetIdentity(kIdentityAlpha); - return Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); } case 2: { LogStep(2, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 3: { LogStep(3, @@ -26568,107 +27040,116 @@ class Test_TC_SC_4_2Suite : public TestCommand } case 4: { LogStep(4, "Check Instance Name"); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 5: { LogStep(5, "Check Long Discriminator _L"); - SetIdentity(kIdentityAlpha); - return FindCommissionableByLongDiscriminator(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type value; + value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; + return FindCommissionableByLongDiscriminator(kIdentityAlpha, value); } case 6: { LogStep(6, "Check Short Discriminator (_S)"); - SetIdentity(kIdentityAlpha); - return FindCommissionableByShortDiscriminator(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type value; + value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; + return FindCommissionableByShortDiscriminator(kIdentityAlpha, value); } case 7: { LogStep(7, "Check Vendor ID (_V)"); VerifyOrdo(!ShouldSkip("VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionableByVendorId(mVendorId.HasValue() ? mVendorId.Value() : 65521U); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; + value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; + return FindCommissionableByVendorId(kIdentityAlpha, value); } case 8: { LogStep(8, "Check Commissioning Mode (_CM)"); - SetIdentity(kIdentityAlpha); - return FindCommissionableByCommissioningMode(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type value; + return FindCommissionableByCommissioningMode(kIdentityAlpha, value); } case 9: { LogStep(9, "TXT key for Vendor ID and Product ID (VP)"); VerifyOrdo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 10: { LogStep(10, "TXT key for Vendor ID and Product ID (VP)"); VerifyOrdo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 11: { LogStep(11, "Optional TXT key for MRP Retry Interval Idle (CRI)"); VerifyOrdo(!ShouldSkip("CRI_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 12: { LogStep(12, "Optional TXT key for MRP Retry Interval Active (CRA)"); VerifyOrdo(!ShouldSkip("CRA_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 13: { LogStep(13, "TXT key for commissioning mode (CM)"); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 14: { LogStep(14, "Optional TXT key for device name (DN)"); VerifyOrdo(!ShouldSkip("DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 15: { LogStep(15, "Optional TXT key for rotating device identifier (RI)"); VerifyOrdo(!ShouldSkip("RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 16: { LogStep(16, "Optional TXT key for pairing hint (PH)"); VerifyOrdo(!ShouldSkip("PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 17: { LogStep(17, "Optional TXT key for pairing instructions (PI)"); VerifyOrdo(!ShouldSkip("PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 18: { LogStep(18, "Check IPs"); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 19: { LogStep(19, "Stop target device"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 20: { LogStep(20, "Start target device with the provided discriminator for basic commissioning advertisement"); - SetIdentity(kIdentityAlpha); - return Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); } case 21: { LogStep(21, "Log commands"); - SetIdentity(kIdentityAlpha); - return Log("TH adds an unknown key/value pair in the advertised data"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span( + "TH adds an unknown key/value pair in the advertised datagarbage: not in length on purpose", 56); + return Log(kIdentityAlpha, value); } case 22: { LogStep(22, "Log commands"); - SetIdentity(kIdentityAlpha); - return Log("Scan for DNS-SD commissioner advertisements from TH"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = + chip::Span("Scan for DNS-SD commissioner advertisements from THgarbage: not in length on purpose", 51); + return Log(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -26783,8 +27264,9 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read NumberOfPositions attribute"); @@ -27028,18 +27510,22 @@ class Test_TC_SWTCH_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Set up subscription to SwitchLatched event"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Set up subscription to SwitchLatched eventgarbage: not in length on purpose", 42); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator sets switch to first position"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator sets switch to first positiongarbage: not in length on purpose", 38); + return UserPrompt(kIdentityAlpha, value); } case 3: { LogStep(3, "Read CurrentPosition attribute"); @@ -27047,18 +27533,22 @@ class Test_TC_SWTCH_2_2Suite : public TestCommand } case 4: { LogStep(4, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator sets switch to second position"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator sets switch to second positiongarbage: not in length on purpose", 39); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Set up subscription to InitialPress event"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Set up subscription to InitialPress eventgarbage: not in length on purpose", 41); + return UserPrompt(kIdentityAlpha, value); } case 6: { LogStep(6, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator does not operate switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator does not operate switchgarbage: not in length on purpose", 32); + return UserPrompt(kIdentityAlpha, value); } case 7: { LogStep(7, "Read CurrentPosition attribute"); @@ -27066,153 +27556,193 @@ class Test_TC_SWTCH_2_2Suite : public TestCommand } case 8: { LogStep(8, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator sets switch to second position"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator sets switch to second positiongarbage: not in length on purpose", 39); + return UserPrompt(kIdentityAlpha, value); } case 9: { LogStep(9, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator does not operate switch (release switch)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Operator does not operate switch (release switch)garbage: not in length on purpose", 49); + return UserPrompt(kIdentityAlpha, value); } case 10: { LogStep(10, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Set up subscription to InitialPress and ShortRelease events"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Set up subscription to InitialPress and ShortRelease eventsgarbage: not in length on purpose", 59); + return UserPrompt(kIdentityAlpha, value); } case 11: { LogStep(11, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator does not operate switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator does not operate switchgarbage: not in length on purpose", 32); + return UserPrompt(kIdentityAlpha, value); } case 12: { LogStep(12, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch (press briefly)garbage: not in length on purpose", 40); + return UserPrompt(kIdentityAlpha, value); } case 13: { LogStep(13, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } case 14: { LogStep(14, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch for 5 seconds"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch for 5 secondsgarbage: not in length on purpose", 38); + return UserPrompt(kIdentityAlpha, value); } case 15: { LogStep(15, "Wait 3000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 16: { LogStep(16, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } case 17: { LogStep(17, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Set up subscription to InitialPress, LongPress, ShortRelease, LongRelease events"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Set up subscription to InitialPress, LongPress, ShortRelease, LongRelease eventsgarbage: not in length on purpose", + 80); + return UserPrompt(kIdentityAlpha, value); } case 18: { LogStep(18, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator does not operate switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator does not operate switchgarbage: not in length on purpose", 32); + return UserPrompt(kIdentityAlpha, value); } case 19: { LogStep(19, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch (press briefly)garbage: not in length on purpose", 40); + return UserPrompt(kIdentityAlpha, value); } case 20: { LogStep(20, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } case 21: { LogStep(21, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch for 5 seconds"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch for 5 secondsgarbage: not in length on purpose", 38); + return UserPrompt(kIdentityAlpha, value); } case 22: { LogStep(22, "Wait 3000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 23: { LogStep(23, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } case 24: { LogStep(24, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Set up subscription to InitialPress, ShortRelease, MultiPressOngoing, MultiPressComplete events"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Set up subscription to InitialPress, ShortRelease, MultiPressOngoing, " + "MultiPressComplete eventsgarbage: not in length on purpose", + 95); + return UserPrompt(kIdentityAlpha, value); } case 25: { LogStep(25, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator does not operate switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator does not operate switchgarbage: not in length on purpose", 32); + return UserPrompt(kIdentityAlpha, value); } case 26: { LogStep(26, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch (press briefly)garbage: not in length on purpose", 40); + return UserPrompt(kIdentityAlpha, value); } case 27: { LogStep(27, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } case 28: { LogStep(28, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator operates switch (press briefly)garbage: not in length on purpose", 40); + return UserPrompt(kIdentityAlpha, value); } case 29: { LogStep(29, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } case 30: { LogStep(30, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch again (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Operator operates switch again (press briefly)garbage: not in length on purpose", 46); + return UserPrompt(kIdentityAlpha, value); } case 31: { LogStep(31, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } case 32: { LogStep(32, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch again (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Operator operates switch again (press briefly)garbage: not in length on purpose", 46); + return UserPrompt(kIdentityAlpha, value); } case 33: { LogStep(33, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } case 34: { LogStep(34, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch again (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Operator operates switch again (press briefly)garbage: not in length on purpose", 46); + return UserPrompt(kIdentityAlpha, value); } case 35: { LogStep(35, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } case 36: { LogStep(36, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator operates switch again (press briefly)"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Operator operates switch again (press briefly)garbage: not in length on purpose", 46); + return UserPrompt(kIdentityAlpha, value); } case 37: { LogStep(37, "User interaction needed"); - SetIdentity(kIdentityAlpha); - return UserPrompt("Operator releases switch"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Operator releases switchgarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -27312,16 +27842,21 @@ class Test_TC_TM_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read ClusterRevision attribute from the DUT and Verify that the DUT response indicates ClusterRevision " "attribute has the value 4"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter ClusterRevision attribute value", "4"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Please enter ClusterRevision attribute valuegarbage: not in length on purpose", 44); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("4garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "Read the global attribute: AttributeList"); @@ -27333,24 +27868,33 @@ class Test_TC_TM_1_1Suite : public TestCommand LogStep(3, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 4: { LogStep(4, "Read AcceptedCommandList attribute from the DUT and Verify that the DUT response provides a list of supported " "commands,This list SHALL include all the mandatory commands."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 5: { LogStep(5, "Read GeneratedCommandList attribute from the DUT and Verify that the DUT response provides a list of " "supported commands."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -27456,8 +28000,9 @@ class Test_TC_TM_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the mandatory attribute: MeasuredValue"); @@ -27577,8 +28122,9 @@ class Test_TC_TM_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the mandatory attribute: MinMeasuredValue"); @@ -27688,8 +28234,9 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read the global attribute constraints: ClusterRevision"); @@ -27965,8 +28512,9 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads constraints of mandatory attributes from DUT: LocalTemperature"); @@ -28437,8 +28985,9 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads OccupiedCoolingSetpoint attribute from Server DUT and verifies that the value is within range"); @@ -28908,16 +29457,21 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read ClusterRevision attribute from the DUT and Verify that the DUT response indicates ClusterRevision " "attribute has the value 2"); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter ClusterRevision attribute value", "2"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Please enter ClusterRevision attribute valuegarbage: not in length on purpose", 44); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("2garbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 2: { LogStep(2, "Read the global attribute: AttributeList"); @@ -28929,8 +29483,11 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand LogStep(3, "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); VerifyOrdo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return UserPrompt("Please enter 'y' for success", "y"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 4: { LogStep(4, "Read the global attribute: AcceptedCommandList"); @@ -29058,8 +29615,9 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "read the mandatory attribute: TemperatureDisplayMode"); @@ -29192,8 +29750,9 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Writes a value of 0 to TemperatureDisplayMode attribute of DUT"); @@ -29373,8 +29932,9 @@ class Test_TC_DIAG_TH_NW_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Sends ResetCounts command"); @@ -30259,8 +30819,9 @@ class Test_TC_DIAG_TH_NW_1_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Validate constraints of attribute: Channel"); @@ -30836,8 +31397,9 @@ class Test_TC_LC_1_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "TH1 reads LabelList attribute from the DUT"); @@ -30960,8 +31522,9 @@ class Test_TC_WIFIDIAG_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads NetworkInterface structure attribute from DUT"); @@ -31056,8 +31619,9 @@ class Test_TC_WIFIDIAG_3_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -31173,8 +31737,9 @@ class Test_TC_WNCV_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "2: read the global attribute: ClusterRevision"); @@ -31675,8 +32240,9 @@ class Test_TC_WNCV_2_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "2: read the RO mandatory attribute default: Type"); @@ -32044,8 +32610,9 @@ class Test_TC_WNCV_2_2Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -32216,8 +32783,9 @@ class Test_TC_WNCV_2_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "1a: TH set the Mode Attribute bit0 of the DUT"); @@ -32409,8 +32977,9 @@ class Test_TC_WNCV_2_4Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads Type attribute from DUT"); @@ -32502,8 +33071,9 @@ class Test_TC_WNCV_2_5Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads EndProductType attribute from DUT"); @@ -32748,8 +33318,9 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { case 0: { LogStep(0, "0: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "1a: TH sends DownOrClose command to preposition the DUT in the opposite direction"); @@ -32759,8 +33330,9 @@ class Test_TC_WNCV_3_1Suite : public TestCommand } case 2: { LogStep(2, "1b: TH Waits for 10 seconds movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { LogStep(3, "1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); @@ -32800,8 +33372,9 @@ class Test_TC_WNCV_3_1Suite : public TestCommand } case 9: { LogStep(9, "2b: DUT updates its attributes"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); @@ -32811,8 +33384,9 @@ class Test_TC_WNCV_3_1Suite : public TestCommand } case 11: { LogStep(11, "2e: TH leave the device moving for 2 seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); } case 12: { LogStep(12, "3a1: Verify DUT reports OperationalStatus attribute to TH after a UpOrOpen"); @@ -32820,8 +33394,9 @@ class Test_TC_WNCV_3_1Suite : public TestCommand } case 13: { LogStep(13, "3a2: DUT updates its attributes"); - SetIdentity(kIdentityAlpha); - return WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); } case 14: { LogStep(14, "3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); @@ -32856,8 +33431,9 @@ class Test_TC_WNCV_3_1Suite : public TestCommand } case 19: { LogStep(19, "4b: TH waits for 3 seconds the end of inertial movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 20: { LogStep(20, "4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion"); @@ -32866,8 +33442,9 @@ class Test_TC_WNCV_3_1Suite : public TestCommand } case 21: { LogStep(21, "5a: TH waits for x seconds attributes update on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 22: { LogStep(22, "5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); @@ -33112,8 +33689,9 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { case 0: { LogStep(0, "0: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction"); @@ -33122,8 +33700,9 @@ class Test_TC_WNCV_3_2Suite : public TestCommand } case 2: { LogStep(2, "1b: TH Waits for 10 seconds movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { LogStep(3, "1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); @@ -33164,8 +33743,9 @@ class Test_TC_WNCV_3_2Suite : public TestCommand } case 9: { LogStep(9, "2b: DUT updates its attributes"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); @@ -33175,8 +33755,9 @@ class Test_TC_WNCV_3_2Suite : public TestCommand } case 11: { LogStep(11, "2e: TH leave the device moving for 2 seconds"); - SetIdentity(kIdentityAlpha); - return WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); } case 12: { LogStep(12, "3a: Verify DUT reports OperationalStatus attribute to TH after a DownOrClose"); @@ -33184,8 +33765,9 @@ class Test_TC_WNCV_3_2Suite : public TestCommand } case 13: { LogStep(13, "3a2: DUT updates its attributes"); - SetIdentity(kIdentityAlpha); - return WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); } case 14: { LogStep(14, "3b: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); @@ -33220,8 +33802,9 @@ class Test_TC_WNCV_3_2Suite : public TestCommand } case 19: { LogStep(19, "4b: TH waits for 3 seconds the end of inertial movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 20: { LogStep(20, "4c: Verify DUT update OperationalStatus attribute to TH after a StopMotion"); @@ -33230,8 +33813,9 @@ class Test_TC_WNCV_3_2Suite : public TestCommand } case 21: { LogStep(21, "5a: TH waits for x seconds attributes update on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 22: { LogStep(22, "5b: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); @@ -33414,8 +33998,9 @@ class Test_TC_WNCV_3_3Suite : public TestCommand { case 0: { LogStep(0, "0: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "1a: TH sends DownOrClose command to preposition the DUT in the opposite direction"); @@ -33425,8 +34010,9 @@ class Test_TC_WNCV_3_3Suite : public TestCommand } case 2: { LogStep(2, "1b: TH Waits for 6-8 seconds movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(6000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 6000UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { LogStep(3, "1c: TH sends UpOrOpen command to preposition the DUT in the opposite direction"); @@ -33435,8 +34021,9 @@ class Test_TC_WNCV_3_3Suite : public TestCommand } case 4: { LogStep(4, "1d: TH Waits for 2 seconds movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { LogStep(5, "2: Subscribe to DUT reports on OperationalStatus attribute"); @@ -33450,8 +34037,9 @@ class Test_TC_WNCV_3_3Suite : public TestCommand } case 7: { LogStep(7, "2b: TH waits for 3 seconds the end of inertial movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "2c: Verify DUT reports OperationalStatus attribute to TH after a StopMotion"); @@ -33459,8 +34047,9 @@ class Test_TC_WNCV_3_3Suite : public TestCommand } case 9: { LogStep(9, "2d: TH waits for 100ms - 3s attributes update on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(2000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "2e: TH reads OperationalStatus attribute from DUT"); @@ -33611,8 +34200,9 @@ class Test_TC_WNCV_3_4Suite : public TestCommand { case 0: { LogStep(0, "0: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "1a: TH sends DownOrClose command to preposition the DUT in the opposite direction"); @@ -33622,8 +34212,9 @@ class Test_TC_WNCV_3_4Suite : public TestCommand } case 2: { LogStep(2, "1b: TH Waits for fastMotionDuration seconds movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { LogStep(3, "2a: TH sends UpOrOpen command to DUT"); @@ -33632,8 +34223,9 @@ class Test_TC_WNCV_3_4Suite : public TestCommand } case 4: { LogStep(4, "2b: TH Waits for fullMotionDuration seconds movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { LogStep(5, "3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); @@ -33777,8 +34369,9 @@ class Test_TC_WNCV_3_5Suite : public TestCommand { case 0: { LogStep(0, "0: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "1a: TH sends UpOrOpen command to preposition the DUT in the opposite direction"); @@ -33787,8 +34380,9 @@ class Test_TC_WNCV_3_5Suite : public TestCommand } case 2: { LogStep(2, "1b: TH Waits for fastMotionDuration seconds movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFastMotionDuration.HasValue() ? mFastMotionDuration.Value() : 3000UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { LogStep(3, "2a: TH sends DownOrClose command to DUT"); @@ -33798,8 +34392,9 @@ class Test_TC_WNCV_3_5Suite : public TestCommand } case 4: { LogStep(4, "2b: TH Waits for fullMotionDuration seconds movement(s) on the device"); - SetIdentity(kIdentityAlpha); - return WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { LogStep(5, "3a: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); @@ -33953,8 +34548,9 @@ class Test_TC_WNCV_4_1Suite : public TestCommand { case 0: { LogStep(0, "0: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "1a: TH sends DownOrClose command to preposition the DUT in the opposite direction"); @@ -33964,8 +34560,9 @@ class Test_TC_WNCV_4_1Suite : public TestCommand } case 2: { LogStep(2, "1b: TH waits for x seconds movement(s) on the DUT"); - SetIdentity(kIdentityAlpha); - return WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { LogStep(3, "1c: If (PA & LF) TH reads CurrentPositionLiftPercent100ths attribute from DUT"); @@ -33985,8 +34582,9 @@ class Test_TC_WNCV_4_1Suite : public TestCommand } case 5: { LogStep(5, "2b: DUT updates its attributes"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "2c: If (PA & LF) TH reads TargetPositionLiftPercent100ths attribute from DUT"); @@ -33996,8 +34594,9 @@ class Test_TC_WNCV_4_1Suite : public TestCommand } case 7: { LogStep(7, "3a: TH set a timeout of X minutes for failure"); - SetIdentity(kIdentityAlpha); - return WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "3b: TH reads OperationalStatus attribute from DUT"); @@ -34016,13 +34615,15 @@ class Test_TC_WNCV_4_1Suite : public TestCommand } case 10: { LogStep(10, "4b: DUT updates its attributes"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 11: { LogStep(11, "5a: TH waits for x seconds movement(s) on the DUT"); - SetIdentity(kIdentityAlpha); - return WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs(kIdentityAlpha, value); } case 12: { LogStep(12, "5b: TH reads OperationalStatus attribute from DUT"); @@ -34155,8 +34756,9 @@ class Test_TC_WNCV_4_2Suite : public TestCommand { case 0: { LogStep(0, "0: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "1a: TH sends DownOrClose command to preposition the DUT in the opposite direction"); @@ -34166,8 +34768,9 @@ class Test_TC_WNCV_4_2Suite : public TestCommand } case 2: { LogStep(2, "1b: TH waits for x seconds movement(s) on the DUT"); - SetIdentity(kIdentityAlpha); - return WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { LogStep(3, "1c: If (PA & TL) TH reads CurrentPositionTiltPercent100ths attribute from DUT"); @@ -34187,8 +34790,9 @@ class Test_TC_WNCV_4_2Suite : public TestCommand } case 5: { LogStep(5, "2b: DUT updates its attributes"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "2c: If (PA & TL) TH reads TargetPositionTiltPercent100ths attribute from DUT"); @@ -34198,8 +34802,9 @@ class Test_TC_WNCV_4_2Suite : public TestCommand } case 7: { LogStep(7, "3a: TH set a timeout of X minutes for failure"); - SetIdentity(kIdentityAlpha); - return WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "3b: TH reads OperationalStatus attribute from DUT"); @@ -34218,13 +34823,15 @@ class Test_TC_WNCV_4_2Suite : public TestCommand } case 10: { LogStep(10, "4b: DUT updates its attributes"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 11: { LogStep(11, "5a: TH waits for x seconds movement(s) on the DUT"); - SetIdentity(kIdentityAlpha); - return WaitForMs(mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000U); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mFullMotionDuration.HasValue() ? mFullMotionDuration.Value() : 6000UL; + return WaitForMs(kIdentityAlpha, value); } case 12: { LogStep(12, "5b: TH reads OperationalStatus attribute from DUT"); @@ -34314,8 +34921,9 @@ class Test_TC_WNCV_4_3Suite : public TestCommand { case 0: { LogStep(0, "0: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "1a: If (PA_LF & LF) TH reads CurrentPositionLiftPercent100ths from DUT"); @@ -34450,8 +35058,9 @@ class Test_TC_WNCV_4_4Suite : public TestCommand { case 0: { LogStep(0, "0: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "1a: If (PA_TL & TL) TH reads CurrentPositionTiltPercent100ths from DUT"); @@ -34657,8 +35266,9 @@ class Test_TC_WNCV_4_5Suite : public TestCommand { case 0: { LogStep(0, "0a: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "0b: TH sends UpOrOpen command to preposition the DUT"); @@ -34677,8 +35287,9 @@ class Test_TC_WNCV_4_5Suite : public TestCommand } case 3: { LogStep(3, "1b: TH Waits for 100ms-1s"); - SetIdentity(kIdentityAlpha); - return WaitForMs(500); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(kIdentityAlpha, value); } case 4: { LogStep(4, "1c: TH sends StopMotion command to DUT"); @@ -34687,8 +35298,9 @@ class Test_TC_WNCV_4_5Suite : public TestCommand } case 5: { LogStep(5, "1d: TH Waits for 100ms-1s"); - SetIdentity(kIdentityAlpha); - return WaitForMs(500); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(kIdentityAlpha, value); } case 6: { LogStep(6, "2a: If (PA_TL & TL) TH sends GoToTiltPercentage command with 90%% to DUT"); @@ -34702,8 +35314,9 @@ class Test_TC_WNCV_4_5Suite : public TestCommand } case 7: { LogStep(7, "2b: TH Waits for 100ms-1s"); - SetIdentity(kIdentityAlpha); - return WaitForMs(500); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(kIdentityAlpha, value); } case 8: { LogStep(8, "2c: TH sends StopMotion command to DUT"); @@ -34712,8 +35325,9 @@ class Test_TC_WNCV_4_5Suite : public TestCommand } case 9: { LogStep(9, "2d: TH Waits for 100ms-1s"); - SetIdentity(kIdentityAlpha); - return WaitForMs(500); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(kIdentityAlpha, value); } case 10: { LogStep(10, "3a: TH reads CurrentPositionLiftPercent100ths from DUT"); @@ -34729,13 +35343,14 @@ class Test_TC_WNCV_4_5Suite : public TestCommand } case 12: { LogStep(12, "3c: reboot/restart the DUT"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 13: { LogStep(13, "3d: Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 14: { LogStep(14, "3e: TH reads CurrentPositionLiftPercent100ths from DUT"); @@ -34850,8 +35465,9 @@ class TV_TargetNavigatorClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read attribute Target Navigator list"); @@ -34995,8 +35611,9 @@ class TV_AudioOutputClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read attribute Audio Output list"); @@ -35140,8 +35757,9 @@ class TV_ApplicationLauncherClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read attribute Application Launcher list"); @@ -35256,8 +35874,9 @@ class TV_KeypadInputClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send Key Command"); @@ -35342,8 +35961,9 @@ class TV_AccountLoginClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Get Setup PIN Command"); @@ -35437,8 +36057,9 @@ class TV_WakeOnLanClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read mac address"); @@ -35580,8 +36201,9 @@ class TV_ApplicationBasicClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read attribute vendor name"); @@ -35900,8 +36522,9 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read attribute playback state"); @@ -36175,8 +36798,9 @@ class TV_ChannelClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read attribute Channel list"); @@ -36274,8 +36898,9 @@ class TV_LowPowerClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Sleep Input Status Command"); @@ -36390,8 +37015,9 @@ class TV_ContentLauncherClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read attribute accept header list"); @@ -36656,8 +37282,9 @@ class TV_MediaInputClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read attribute media input list"); @@ -39939,8 +40566,9 @@ class TestClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send Test Command"); @@ -43402,8 +44030,9 @@ class TestClusterComplexTypesSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send Test Command with optional arg set to null."); @@ -43720,8 +44349,9 @@ class TestConstraintsSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Write attribute INT32U Value"); @@ -43891,13 +44521,15 @@ class TestDelayCommandsSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(100); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -44083,8 +44715,9 @@ class TestEventsSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Check there is no event on the target endpoint"); @@ -44445,18 +45078,21 @@ class TestDiscoverySuite : public TestCommand { case 0: { LogStep(0, "Stop target device"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 1: { LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); - SetIdentity(kIdentityAlpha); - return Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); } case 2: { LogStep(2, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 3: { LogStep(3, "Open Commissioning Window with too-short timeout"); @@ -44484,107 +45120,113 @@ class TestDiscoverySuite : public TestCommand } case 6: { LogStep(6, "Check Instance Name"); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 7: { LogStep(7, "Check Long Discriminator _L"); - SetIdentity(kIdentityAlpha); - return FindCommissionableByLongDiscriminator(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByLongDiscriminator::Type value; + value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; + return FindCommissionableByLongDiscriminator(kIdentityAlpha, value); } case 8: { LogStep(8, "Check Short Discriminator (_S)"); - SetIdentity(kIdentityAlpha); - return FindCommissionableByShortDiscriminator(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByShortDiscriminator::Type value; + value.value = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840ULL; + return FindCommissionableByShortDiscriminator(kIdentityAlpha, value); } case 9: { LogStep(9, "Check Commissioning Mode (_CM)"); - SetIdentity(kIdentityAlpha); - return FindCommissionableByCommissioningMode(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByCommissioningMode::Type value; + return FindCommissionableByCommissioningMode(kIdentityAlpha, value); } case 10: { LogStep(10, "Check Vendor ID (_V)"); VerifyOrdo(!ShouldSkip("VENDOR_SUBTYPE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionableByVendorId(mVendorId.HasValue() ? mVendorId.Value() : 65521U); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionableByVendorId::Type value; + value.value = mVendorId.HasValue() ? mVendorId.Value() : 65521ULL; + return FindCommissionableByVendorId(kIdentityAlpha, value); } case 11: { LogStep(11, "TXT key for discriminator (D)"); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 12: { LogStep(12, "TXT key for Vendor ID and Product ID (VP)"); VerifyOrdo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 13: { LogStep(13, "TXT key for Vendor ID and Product ID (VP)"); VerifyOrdo(!ShouldSkip("VP_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 14: { LogStep(14, "Optional TXT key for MRP Retry Interval Idle (CRI)"); VerifyOrdo(!ShouldSkip("CRI_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 15: { LogStep(15, "Optional TXT key for MRP Retry Interval Active (CRA)"); VerifyOrdo(!ShouldSkip("CRA_COMM_DISCOVERY_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 16: { LogStep(16, "TXT key for commissioning mode (CM)"); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 17: { LogStep(17, "Optional TXT key for device name (DN)"); VerifyOrdo(!ShouldSkip("DN_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 18: { LogStep(18, "Optional TXT key for rotating device identifier (RI)"); VerifyOrdo(!ShouldSkip("RI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 19: { LogStep(19, "Optional TXT key for pairing hint (PH)"); VerifyOrdo(!ShouldSkip("PH_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 20: { LogStep(20, "Optional TXT key for pairing instructions (PI)"); VerifyOrdo(!ShouldSkip("PI_KEY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 21: { LogStep(21, "Check IPs"); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } case 22: { LogStep(22, "Stop target device"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 23: { LogStep(23, "Start target device with the provided discriminator for basic commissioning advertisement"); - SetIdentity(kIdentityAlpha); - return Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); } case 24: { LogStep(24, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 25: { LogStep(25, "Open Commissioning Window"); @@ -44596,8 +45238,8 @@ class TestDiscoverySuite : public TestCommand } case 26: { LogStep(26, "Check Instance Name"); - SetIdentity(kIdentityAlpha); - return FindCommissionable(); + chip::app::Clusters::DiscoveryCommands::Commands::FindCommissionable::Type value; + return FindCommissionable(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -44669,18 +45311,21 @@ class TestLogCommandsSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Log a simple message"); - SetIdentity(kIdentityAlpha); - return Log("This is a simple message"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("This is a simple messagegarbage: not in length on purpose", 24); + return Log(kIdentityAlpha, value); } case 2: { LogStep(2, "Do a simple user prompt message"); - SetIdentity(kIdentityAlpha); - return UserPrompt("This is a simple message"); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("This is a simple messagegarbage: not in length on purpose", 24); + return UserPrompt(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -45533,8 +46178,9 @@ class TestSaveAsSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send Test Add Arguments Command"); @@ -46153,8 +46799,9 @@ class TestConfigVariablesSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send Test Add Arguments Command"); @@ -46338,8 +46985,9 @@ class TestDescriptorClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read attribute Device list"); @@ -46569,8 +47217,9 @@ class TestBasicInformationSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read location"); @@ -46626,13 +47275,14 @@ class TestBasicInformationSuite : public TestCommand } case 12: { LogStep(12, "Reboot the device"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 13: { LogStep(13, "Connect to the device again"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 14: { LogStep(14, "Read back NodeLabel after reboot"); @@ -46920,8 +47570,9 @@ class TestGeneralCommissioningSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Write Breadcrumb (1/2)"); @@ -46949,13 +47600,14 @@ class TestGeneralCommissioningSuite : public TestCommand } case 5: { LogStep(5, "Reboot to reset Breadcrumb"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 6: { LogStep(6, "Connect to the device again"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 7: { LogStep(7, "Read back Breadcrumb after reboot and ensure it was not persisted"); @@ -47015,14 +47667,16 @@ class TestGeneralCommissioningSuite : public TestCommand } case 16: { LogStep(16, "Commission from beta"); - SetIdentity(kIdentityBeta); - return PairWithQRCode( - 74565, mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = 74565ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityBeta, value); } case 17: { LogStep(17, "Wait for the commissioned device to be retrieved for beta"); - SetIdentity(kIdentityBeta); - return WaitForCommissionee(74565); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = 74565ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 18: { LogStep(18, "Arm fail-safe"); @@ -47169,8 +47823,9 @@ class TestIdentifyClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Send Identify command and expect success response"); @@ -47322,8 +47977,9 @@ class TestOperationalCredentialsClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read number of supported fabrics"); @@ -47619,8 +48275,9 @@ class TestModeSelectClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read Description"); @@ -47748,13 +48405,14 @@ class TestModeSelectClusterSuite : public TestCommand } case 25: { LogStep(25, "Reboot target device"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 26: { LogStep(26, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 27: { LogStep(27, "Verify Current Mode Change based on OnMode, as it overwrites StartUpMode"); @@ -47768,13 +48426,14 @@ class TestModeSelectClusterSuite : public TestCommand } case 29: { LogStep(29, "Reboot target device"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 30: { LogStep(30, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 31: { LogStep(31, "Verify Current Mode Change based on new StartUp Mode"); @@ -47871,8 +48530,9 @@ class TestSelfFabricRemovalSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read number of commissioned fabrics"); @@ -48039,114 +48699,163 @@ class TestSystemCommandsSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Stop the default accessory"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 2: { LogStep(2, "Start the default accessory with no command line options"); - SetIdentity(kIdentityAlpha); - return Start(); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + return Start(kIdentityAlpha, value); } case 3: { LogStep(3, "Stop the default accessory by key"); - SetIdentity(kIdentityAlpha); - return Stop("default"); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + return Stop(kIdentityAlpha, value); } case 4: { LogStep(4, "Start the default accessory with discriminator command line option"); - SetIdentity(kIdentityAlpha); - return Start(1111); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 1111U; + return Start(kIdentityAlpha, value); } case 5: { LogStep(5, "Stop the default accessory"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 6: { LogStep(6, "Start the default accessory with discriminator and port command line options"); - SetIdentity(kIdentityAlpha); - return Start(1111, 5560); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 1111U; + value.port.Emplace(); + value.port.Value() = 5560U; + return Start(kIdentityAlpha, value); } case 7: { LogStep(7, "Stop the default accessory"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 8: { - LogStep(8, "Start the default accessory with all command line options"); - SetIdentity(kIdentityAlpha); - return Start(1111, 5560, "/tmp/chip_kvs_default"); + LogStep(8, "Start the default accessory with minCommissioningTimeout only"); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.minCommissioningTimeout.Emplace(); + value.minCommissioningTimeout.Value() = 10U; + return Start(kIdentityAlpha, value); } case 9: { LogStep(9, "Stop the default accessory"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 10: { LogStep(10, "Start the default accessory by key with all command line options"); - SetIdentity(kIdentityAlpha); - return Start(1111, 5560, "/tmp/chip_kvs_default", "default"); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 1111U; + value.port.Emplace(); + value.port.Value() = 5560U; + value.kvs.Emplace(); + value.kvs.Value() = chip::Span("/tmp/chip_kvs_defaultgarbage: not in length on purpose", 21); + value.minCommissioningTimeout.Emplace(); + value.minCommissioningTimeout.Value() = 10U; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + return Start(kIdentityAlpha, value); } case 11: { LogStep(11, "Start a second accessory with all command line options"); - SetIdentity(kIdentityAlpha); - return Start(50, 5561, "/tmp/chip_kvs_lock", "chip-lock-app"); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 50U; + value.port.Emplace(); + value.port.Value() = 5561U; + value.kvs.Emplace(); + value.kvs.Value() = chip::Span("/tmp/chip_kvs_lockgarbage: not in length on purpose", 18); + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); + return Start(kIdentityAlpha, value); } case 12: { LogStep(12, "Commission second accessory from alpha"); - SetIdentity(kIdentityAlpha); - return PairWithQRCode( - 3735928559, mPayload.HasValue() ? mPayload.Value() : chip::CharSpan::fromCharString("MT:-24J0IX4122-.548G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = 3735928559ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); + return PairWithQRCode(kIdentityAlpha, value); } case 13: { LogStep(13, "Wait for the second commissioned device to be retrieved for alpha"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(3735928559); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = 3735928559ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 14: { LogStep(14, "Stop the second accessory"); - SetIdentity(kIdentityAlpha); - return Stop("chip-lock-app"); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); + return Stop(kIdentityAlpha, value); } case 15: { LogStep(15, "Start a second accessory with different KVS"); - SetIdentity(kIdentityAlpha); - return Start(50, 5561, "/tmp/chip_kvs_lock2", "chip-lock-app"); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 50U; + value.port.Emplace(); + value.port.Value() = 5561U; + value.kvs.Emplace(); + value.kvs.Value() = chip::Span("/tmp/chip_kvs_lock2garbage: not in length on purpose", 19); + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); + return Start(kIdentityAlpha, value); } case 16: { LogStep(16, "Reboot the default accessory"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 17: { LogStep(17, "Reboot the default accessory by key"); - SetIdentity(kIdentityAlpha); - return Reboot("default"); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + return Reboot(kIdentityAlpha, value); } case 18: { LogStep(18, "Reboot the second accessory"); - SetIdentity(kIdentityAlpha); - return Reboot("chip-lock-app"); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); + return Reboot(kIdentityAlpha, value); } case 19: { LogStep(19, "Factory Reset the default accessory"); - SetIdentity(kIdentityAlpha); - return FactoryReset(); + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); } case 20: { LogStep(20, "Factory Reset the default accessory by key"); - SetIdentity(kIdentityAlpha); - return FactoryReset("default"); + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + return FactoryReset(kIdentityAlpha, value); } case 21: { LogStep(21, "Factory Reset the second accessory"); - SetIdentity(kIdentityAlpha); - return FactoryReset("chip-lock-app"); + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); + return FactoryReset(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -48308,8 +49017,9 @@ class TestBindingSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Write empty binding table"); @@ -48527,8 +49237,9 @@ class TestUserLabelClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Clear User Label List"); @@ -48570,13 +49281,14 @@ class TestUserLabelClusterSuite : public TestCommand } case 4: { LogStep(4, "Reboot target device"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 5: { LogStep(5, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 6: { LogStep(6, "Verify"); @@ -48678,13 +49390,14 @@ class TestArmFailSafeSuite : public TestCommand { case 0: { LogStep(0, "Reboot target device"); - SetIdentity(kIdentityAlpha); - return Reboot(); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); } case 1: { LogStep(1, "Wait for the alpha device to be retrieved "); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 2: { LogStep(2, "Query fabrics list"); @@ -48873,25 +49586,28 @@ class TestMultiAdminSuite : public TestCommand { case 0: { LogStep(0, "Stop target device"); - SetIdentity(kIdentityAlpha); - return Stop(); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop(kIdentityAlpha, value); } case 1: { LogStep(1, "Start target device with the provided discriminator for basic commissioning advertisement"); - SetIdentity(kIdentityAlpha); - return Start(mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start(kIdentityAlpha, value); } case 2: { LogStep(2, "Wait for the commissioned device to be retrieved for alpha"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 3: { LogStep(3, "Commission from alpha when the commissioning window is not opened"); - SetIdentity(kIdentityAlpha); - return PairWithQRCode(mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityAlpha, value); } case 4: { LogStep(4, "Open Commissioning Window from alpha"); @@ -48903,10 +49619,10 @@ class TestMultiAdminSuite : public TestCommand } case 5: { LogStep(5, "Commission from alpha again"); - SetIdentity(kIdentityAlpha); - return PairWithQRCode(mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeIdForDuplicateCommissioning.HasValue() ? mNodeIdForDuplicateCommissioning.Value() : 17ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityAlpha, value); } case 6: { LogStep(6, "Check that we just have the one fabric and did not add a new one"); @@ -48930,15 +49646,16 @@ class TestMultiAdminSuite : public TestCommand } case 9: { LogStep(9, "Commission from beta"); - SetIdentity(kIdentityBeta); - return PairWithQRCode(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityBeta, value); } case 10: { LogStep(10, "Wait for the commissioned device to be retrieved for beta"); - SetIdentity(kIdentityBeta); - return WaitForCommissionee(mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 11: { LogStep(11, "Open Commissioning Window from beta"); @@ -48950,15 +49667,16 @@ class TestMultiAdminSuite : public TestCommand } case 12: { LogStep(12, "Commission from gamma"); - SetIdentity(kIdentityGamma); - return PairWithQRCode(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL, - mPayload.HasValue() ? mPayload.Value() - : chip::CharSpan::fromCharString("MT:-24J0AFN00KA0648G00")); + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithQRCode(kIdentityGamma, value); } case 13: { LogStep(13, "Wait for the commissioned device to be retrieved for gamma"); - SetIdentity(kIdentityGamma); - return WaitForCommissionee(mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + return WaitForCommissionee(kIdentityGamma, value); } case 14: { LogStep(14, "read the mandatory attribute: NodeLabel from alpha"); @@ -49087,8 +49805,9 @@ class Test_TC_SWDIAG_1_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Reads a list of ThreadMetrics struct non-global attribute from DUT."); @@ -49258,8 +49977,9 @@ class Test_TC_SWDIAG_3_1Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Sends ResetWatermarks to DUT"); @@ -49378,8 +50098,9 @@ class TestSubscribe_OnOffSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Set OnOff Attribute to false"); @@ -50911,8 +51632,9 @@ class DL_UsersAndCredentialsSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read available user slot and verify response fields"); @@ -52105,8 +52827,9 @@ class DL_LockUnlockSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Create new PIN credential and lock/unlock user"); @@ -52960,8 +53683,9 @@ class DL_SchedulesSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Create new PIN credential and schedule user"); @@ -53776,8 +54500,9 @@ class Test_TC_DL_1_3Suite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Create new PIN credential and lock/unlock user"); @@ -53822,8 +54547,9 @@ class Test_TC_DL_1_3Suite : public TestCommand } case 6: { LogStep(6, "Wait 10000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(10000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "TH reads LockState attriute"); @@ -53978,8 +54704,9 @@ class TestGroupMessagingSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Add Group 1 (endpoint 1)"); @@ -54415,8 +55142,9 @@ class TestGroupsClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "View Group 0 (invalid)"); @@ -54763,8 +55491,9 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Read maxGroupsPerFabric"); @@ -55015,9 +55744,12 @@ class Test_TC_DD_1_5Suite : public TestCommand { case 0: { LogStep(0, "Step 1"); - SetIdentity(kIdentityAlpha); - return Log("Verify that the onboarding payload for NFC tags SHALL use NDEF URI Record Type Definition as defined by " - "NFC Forum in URI Record Type Definition RTD URI"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span( + "Verify that the onboarding payload for NFC tags SHALL use NDEF URI Record Type Definition as defined by NFC Forum " + "in URI Record Type Definition RTD URIgarbage: not in length on purpose", + 151); + return Log(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -55089,20 +55821,26 @@ class Test_TC_DD_1_6Suite : public TestCommand { case 0: { LogStep(0, "Step 1"); - SetIdentity(kIdentityAlpha); - return Log("Scan the DUTs QR code using a QR code reader"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = + chip::Span("Scan the DUTs QR code using a QR code readergarbage: not in length on purpose", 44); + return Log(kIdentityAlpha, value); } case 1: { LogStep(1, "Step 1 verification"); - SetIdentity(kIdentityAlpha); - return Log( - "Verify the QR code gets scanned successfully and the QR code must be of sufficient size and contrast respective " - "to surface material as to be readable with standard readers such as smartphones in normal lighting conditions"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = + chip::Span("Verify the QR code gets scanned successfully and the QR code must be of sufficient size " + "and contrast respective to surface material as to be readable with standard readers such " + "as smartphones in normal lighting conditionsgarbage: not in length on purpose", + 221); + return Log(kIdentityAlpha, value); } case 2: { LogStep(2, "Step 2 verificaiton"); - SetIdentity(kIdentityAlpha); - return Log("Verify QR code version is 1 or higher"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("Verify QR code version is 1 or highergarbage: not in length on purpose", 37); + return Log(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -55170,14 +55908,20 @@ class Test_TC_DD_1_7Suite : public TestCommand { case 0: { LogStep(0, "Precondition"); - SetIdentity(kIdentityAlpha); - return Log("Verify manual pairing code is printed on the device or in additional provided materials"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("Verify manual pairing code is printed on the device or in additional provided " + "materialsgarbage: not in length on purpose", + 87); + return Log(kIdentityAlpha, value); } case 1: { LogStep(1, "Step 1"); - SetIdentity(kIdentityAlpha); - return Log("Verify that the Manual Pairing Code should be printed using a minimum font size of 6 points typically " - "producing a typeface height of 2.1 mm"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = + chip::Span("Verify that the Manual Pairing Code should be printed using a minimum font size of 6 " + "points typically producing a typeface height of 2.1 mmgarbage: not in length on purpose", + 139); + return Log(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -55245,14 +55989,17 @@ class Test_TC_DD_1_8Suite : public TestCommand { case 0: { LogStep(0, "Step 1"); - SetIdentity(kIdentityAlpha); - return Log("Scan the device QR code using DUT"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("Scan the device QR code using DUTgarbage: not in length on purpose", 33); + return Log(kIdentityAlpha, value); } case 1: { LogStep(1, "Step 1 verification"); - SetIdentity(kIdentityAlpha); - return Log( - "Verify the DUT is able to scan and parse the QR code successfully to onboard the device onto the CHIP network"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("Verify the DUT is able to scan and parse the QR code successfully to onboard " + "the device onto the CHIP networkgarbage: not in length on purpose", + 109); + return Log(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -55324,20 +56071,27 @@ class Test_TC_DD_1_9Suite : public TestCommand { case 0: { LogStep(0, "Precondition"); - SetIdentity(kIdentityAlpha); - return Log("Verify that the manual pairing code is printed on the device or in additional provided materials"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("Verify that the manual pairing code is printed on the device or in additional " + "provided materialsgarbage: not in length on purpose", + 96); + return Log(kIdentityAlpha, value); } case 1: { LogStep(1, "Step 1"); - SetIdentity(kIdentityAlpha); - return Log( - "Provide the 11 digit or 21 digit pairing code from the Device in text speech or any format supported by DUT"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("Provide the 11 digit or 21 digit pairing code from the Device in text speech " + "or any format supported by DUTgarbage: not in length on purpose", + 107); + return Log(kIdentityAlpha, value); } case 2: { LogStep(2, "Step 1 verification"); - SetIdentity(kIdentityAlpha); - return Log("Verify that the manual pairing code can be provided to DUT and parsed to onboard the device onto the CHIP " - "network"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("Verify that the manual pairing code can be provided to DUT and parsed to " + "onboard the device onto the CHIP networkgarbage: not in length on purpose", + 113); + return Log(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -56592,8 +57346,9 @@ class TestGroupDemoCommandSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Turn On the light to see attribute change"); @@ -56602,8 +57357,9 @@ class TestGroupDemoCommandSuite : public TestCommand } case 2: { LogStep(2, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 3: { LogStep(3, "Turn Off the light to see attribute change"); @@ -56612,8 +57368,9 @@ class TestGroupDemoCommandSuite : public TestCommand } case 4: { LogStep(4, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { LogStep(5, "Turn On the light to see attribute change"); @@ -56622,8 +57379,9 @@ class TestGroupDemoCommandSuite : public TestCommand } case 6: { LogStep(6, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { LogStep(7, "Turn Off the light to see attribute change"); @@ -56632,8 +57390,9 @@ class TestGroupDemoCommandSuite : public TestCommand } case 8: { LogStep(8, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 9: { LogStep(9, "Turn On the light to see attribute change"); @@ -56642,8 +57401,9 @@ class TestGroupDemoCommandSuite : public TestCommand } case 10: { LogStep(10, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 11: { LogStep(11, "Turn Off the light to see attribute change"); @@ -56652,8 +57412,9 @@ class TestGroupDemoCommandSuite : public TestCommand } case 12: { LogStep(12, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { LogStep(13, "Turn On the light to see attribute change"); @@ -56662,8 +57423,9 @@ class TestGroupDemoCommandSuite : public TestCommand } case 14: { LogStep(14, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 15: { LogStep(15, "Turn Off the light to see attribute change"); @@ -56672,8 +57434,9 @@ class TestGroupDemoCommandSuite : public TestCommand } case 16: { LogStep(16, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { LogStep(17, "Turn On the light to see attribute change"); @@ -56682,8 +57445,9 @@ class TestGroupDemoCommandSuite : public TestCommand } case 18: { LogStep(18, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } case 19: { LogStep(19, "Turn Off the light to see attribute change"); @@ -56692,8 +57456,9 @@ class TestGroupDemoCommandSuite : public TestCommand } case 20: { LogStep(20, "Wait 100ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(1000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); } } return CHIP_NO_ERROR; @@ -56777,8 +57542,9 @@ class TestGroupDemoConfigSuite : public TestCommand { case 0: { LogStep(0, "Wait for the commissioned device to be retrieved"); - SetIdentity(kIdentityAlpha); - return WaitForCommissionee(mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); } case 1: { LogStep(1, "Add Group 1 - endpoint 1"); diff --git a/zzz_generated/controller-clusters/zap-generated/tests/simulated-cluster-objects.h b/zzz_generated/controller-clusters/zap-generated/tests/simulated-cluster-objects.h new file mode 100644 index 00000000000000..80a62f725a60b0 --- /dev/null +++ b/zzz_generated/controller-clusters/zap-generated/tests/simulated-cluster-objects.h @@ -0,0 +1,1223 @@ +/* + * + * 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. + */ + +// THIS FILE IS GENERATED BY ZAP + +#include +#include + +#pragma once + +namespace chip { + +struct PairWithQRCodeCommand +{ + chip::NodeId nodeId; + chip::CharSpan payload; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), nodeId)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), payload)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, nodeId)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, payload)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct PairWithManualCodeCommand +{ + chip::NodeId nodeId; + chip::CharSpan payload; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), nodeId)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), payload)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, nodeId)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, payload)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct UnpairCommand +{ + chip::NodeId nodeId; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), nodeId)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, nodeId)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct WaitForMsCommand +{ + uint32_t ms; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), ms)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, ms)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct WaitForCommissioningCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct WaitForCommissioneeCommand +{ + chip::NodeId nodeId; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), nodeId)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, nodeId)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct WaitForCommissionableAdvertisementCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct WaitForOperationalAdvertisementCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByShortDiscriminatorCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByLongDiscriminatorCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByCommissioningModeCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByVendorIdCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByDeviceTypeCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionableByNameCommand +{ + chip::CharSpan value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionerCommand +{ + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionerByVendorIdCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FindCommissionerByDeviceTypeCommand +{ + uint64_t value; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), value)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct DiscoveryCommandResponse +{ + chip::CharSpan hostName; + chip::CharSpan instanceName; + uint16_t longDiscriminator; + uint8_t shortDiscriminator; + uint16_t vendorId; + uint16_t productId; + uint8_t commissioningMode; + uint16_t deviceType; + chip::CharSpan deviceName; + chip::ByteSpan rotatingId; + uint64_t rotatingIdLen; + uint16_t pairingHint; + chip::CharSpan pairingInstruction; + bool supportsTcp; + uint8_t numIPs; + uint16_t port; + Optional mrpRetryIntervalIdle; + Optional mrpRetryIntervalActive; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), hostName)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), instanceName)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(2), longDiscriminator)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(3), shortDiscriminator)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(4), vendorId)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(5), productId)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(6), commissioningMode)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(7), deviceType)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(8), deviceName)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(9), rotatingId)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(10), rotatingIdLen)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(11), pairingHint)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(12), pairingInstruction)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(13), supportsTcp)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(14), numIPs)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(15), port)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(16), mrpRetryIntervalIdle)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(17), mrpRetryIntervalActive)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, hostName)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, instanceName)); + break; + case 2: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, longDiscriminator)); + break; + case 3: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, shortDiscriminator)); + break; + case 4: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, vendorId)); + break; + case 5: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, productId)); + break; + case 6: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, commissioningMode)); + break; + case 7: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, deviceType)); + break; + case 8: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, deviceName)); + break; + case 9: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, rotatingId)); + break; + case 10: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, rotatingIdLen)); + break; + case 11: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, pairingHint)); + break; + case 12: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, pairingInstruction)); + break; + case 13: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, supportsTcp)); + break; + case 14: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, numIPs)); + break; + case 15: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, port)); + break; + case 16: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, mrpRetryIntervalIdle)); + break; + case 17: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, mrpRetryIntervalActive)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct LogCommand +{ + chip::CharSpan message; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), message)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, message)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct UserPromptCommand +{ + chip::CharSpan message; + Optional expectedValue; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), message)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), expectedValue)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, message)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, expectedValue)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct StartCommand +{ + Optional discriminator; + Optional port; + Optional kvs; + Optional minCommissioningTimeout; + Optional registerKey; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), discriminator)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), port)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(2), kvs)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(3), minCommissioningTimeout)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(4), registerKey)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, discriminator)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, port)); + break; + case 2: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, kvs)); + break; + case 3: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, minCommissioningTimeout)); + break; + case 4: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, registerKey)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct StopCommand +{ + Optional registerKey; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), registerKey)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, registerKey)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct RebootCommand +{ + Optional registerKey; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), registerKey)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, registerKey)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct FactoryResetCommand +{ + Optional registerKey; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), registerKey)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, registerKey)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +namespace app { +namespace Clusters { + +namespace CommissionerCommands { +namespace Commands { +namespace PairWithQRCode { +using Type = struct PairWithQRCodeCommand; +} +namespace PairWithManualCode { +using Type = struct PairWithManualCodeCommand; +} +namespace Unpair { +using Type = struct UnpairCommand; +} +} // namespace Commands +} // namespace CommissionerCommands + +namespace DelayCommands { +namespace Commands { +namespace WaitForMs { +using Type = struct WaitForMsCommand; +} +namespace WaitForCommissioning { +using Type = struct WaitForCommissioningCommand; +} +namespace WaitForCommissionee { +using Type = struct WaitForCommissioneeCommand; +} +namespace WaitForCommissionableAdvertisement { +using Type = struct WaitForCommissionableAdvertisementCommand; +} +namespace WaitForOperationalAdvertisement { +using Type = struct WaitForOperationalAdvertisementCommand; +} +} // namespace Commands +} // namespace DelayCommands + +namespace DiscoveryCommands { +namespace Commands { +namespace FindCommissionable { +using Type = struct FindCommissionableCommand; +} +namespace FindCommissionableByShortDiscriminator { +using Type = struct FindCommissionableByShortDiscriminatorCommand; +} +namespace FindCommissionableByLongDiscriminator { +using Type = struct FindCommissionableByLongDiscriminatorCommand; +} +namespace FindCommissionableByCommissioningMode { +using Type = struct FindCommissionableByCommissioningModeCommand; +} +namespace FindCommissionableByVendorId { +using Type = struct FindCommissionableByVendorIdCommand; +} +namespace FindCommissionableByDeviceType { +using Type = struct FindCommissionableByDeviceTypeCommand; +} +namespace FindCommissionableByName { +using Type = struct FindCommissionableByNameCommand; +} +namespace FindCommissioner { +using Type = struct FindCommissionerCommand; +} +namespace FindCommissionerByVendorId { +using Type = struct FindCommissionerByVendorIdCommand; +} +namespace FindCommissionerByDeviceType { +using Type = struct FindCommissionerByDeviceTypeCommand; +} +namespace DiscoveryCommandResponse { +using DecodableType = struct DiscoveryCommandResponse; +} +} // namespace Commands +} // namespace DiscoveryCommands + +namespace LogCommands { +namespace Commands { +namespace Log { +using Type = struct LogCommand; +} +namespace UserPrompt { +using Type = struct UserPromptCommand; +} +} // namespace Commands +} // namespace LogCommands + +namespace SystemCommands { +namespace Commands { +namespace Start { +using Type = struct StartCommand; +} +namespace Stop { +using Type = struct StopCommand; +} +namespace Reboot { +using Type = struct RebootCommand; +} +namespace FactoryReset { +using Type = struct FactoryResetCommand; +} +} // namespace Commands +} // namespace SystemCommands + +} // namespace Clusters +} // namespace app + +} // namespace chip diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index 2b77262870c0b1..cbe9fe0e1063cd 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -77,13 +77,14 @@ class Test_TC_DM_1_3_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "Wait for the device to be commissioned"); - SetIdentity(kIdentityAlpha); - return WaitForCommissioning(); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); } case 1: { LogStep(1, "Log OnOff Test Startup"); - SetIdentity(kIdentityAlpha); - return Log("*** Basic Cluster Tests Ready"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("*** Basic Cluster Tests Readygarbage: not in length on purpose", 29); + return Log(kIdentityAlpha, value); } case 2: { LogStep(2, "Query Data Model Revision"); @@ -218,8 +219,8 @@ class Test_TC_DM_3_3_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "Wait for the device to be commissioned"); - SetIdentity(kIdentityAlpha); - return WaitForCommissioning(); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); } case 1: { LogStep(1, "Wait for Scan Network Command"); @@ -343,8 +344,9 @@ class Test_TC_DM_2_3_SimulatedSuite : public TestCommand } case 9: { LogStep(9, "Wait 3000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs(kIdentityAlpha, value); } } return CHIP_NO_ERROR; diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index 2b77262870c0b1..cbe9fe0e1063cd 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -77,13 +77,14 @@ class Test_TC_DM_1_3_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "Wait for the device to be commissioned"); - SetIdentity(kIdentityAlpha); - return WaitForCommissioning(); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); } case 1: { LogStep(1, "Log OnOff Test Startup"); - SetIdentity(kIdentityAlpha); - return Log("*** Basic Cluster Tests Ready"); + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("*** Basic Cluster Tests Readygarbage: not in length on purpose", 29); + return Log(kIdentityAlpha, value); } case 2: { LogStep(2, "Query Data Model Revision"); @@ -218,8 +219,8 @@ class Test_TC_DM_3_3_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "Wait for the device to be commissioned"); - SetIdentity(kIdentityAlpha); - return WaitForCommissioning(); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); } case 1: { LogStep(1, "Wait for Scan Network Command"); @@ -343,8 +344,9 @@ class Test_TC_DM_2_3_SimulatedSuite : public TestCommand } case 9: { LogStep(9, "Wait 3000ms"); - SetIdentity(kIdentityAlpha); - return WaitForMs(3000); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs(kIdentityAlpha, value); } } return CHIP_NO_ERROR; From afb7ccbda95885efc31043136c29dbd2cd38d544 Mon Sep 17 00:00:00 2001 From: Martin Turon Date: Mon, 9 May 2022 12:42:47 -0700 Subject: [PATCH 08/26] [sleepy] Rename sleepy params per spec. (#17927) * [sleepy] Initial rename of CRA/CRI to SAI/SII. * [sleepy] More CRA/CRI -> SAI/SII rename. * [sleepy] Update comments per review. * [sleepy] Test mainline case: SAI < SII. * [sleepy] Fix test after SAI < SII. --- .../suites/certification/Test_TC_SC_4_5.yaml | 4 +- src/controller/CHIPDeviceController.cpp | 2 +- src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp | 22 +++-- src/lib/dnssd/Discovery_ImplPlatform.cpp | 14 +-- src/lib/dnssd/Resolver.h | 2 +- src/lib/dnssd/TxtFields.cpp | 8 +- src/lib/dnssd/TxtFields.h | 12 +-- .../minimal_mdns/tests/TestAdvertiser.cpp | 19 ++-- src/lib/dnssd/platform/tests/TestPlatform.cpp | 10 +-- src/lib/dnssd/tests/TestTxtFields.cpp | 88 +++++++++---------- 10 files changed, 90 insertions(+), 91 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml b/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml index 33ac99b1ebfca8..9f385e2189f443 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_4_5.yaml @@ -27,7 +27,7 @@ tests: verification: "1. On the raspi controller, publish matter service, using below command $avahi-publish-service 87E1B004E235A130-8FC7772401CD0696 - _matter._tcp 22222 CRI=3000 CRA=4000 T=0" + _matter._tcp 22222 SII=3000 SAI=2000 T=0" disabled: true - label: @@ -51,7 +51,7 @@ tests: verification: "1. On the raspi controller, publish matter service chanding the T value 1, using below command $avahi-publish-service - 87E1B004E235A130-8FC7772401CD0696 _matter._tcp 22222 CRI=3000 CRA=4000 + 87E1B004E235A130-8FC7772401CD0696 _matter._tcp 22222 SII=3000 SAI=2000 T=1" disabled: true diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index c62755a15f7bd4..2d75459bb8acf5 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -612,7 +612,7 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re } } #endif - // TODO: In some cases like PASE over IP, CRA and CRI values from commissionable node service should be used + // TODO: In some cases like PASE over IP, SAI and SII values from commissionable node service should be used session = mSystemState->SessionMgr()->CreateUnauthenticatedSession(params.GetPeerAddress(), device->GetRemoteMRPConfig()); VerifyOrExit(session.HasValue(), err = CHIP_ERROR_NO_MEMORY); diff --git a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp index 7a27f8738ba8dc..d8c13907fc4598 100644 --- a/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp +++ b/src/lib/dnssd/Advertiser_ImplMinimalMdns.cpp @@ -206,9 +206,8 @@ class AdvertiserMinMdns : public ServiceAdvertiser, struct CommonTxtEntryStorage { // +2 for all to account for '=' and terminating nullchar - char mrpRetryIntervalIdleBuf[KeySize(TxtFieldKey::kMrpRetryIntervalIdle) + ValSize(TxtFieldKey::kMrpRetryIntervalIdle) + 2]; - char mrpRetryIntervalActiveBuf[KeySize(TxtFieldKey::kMrpRetryIntervalActive) + - ValSize(TxtFieldKey::kMrpRetryIntervalActive) + 2]; + char sleepyIdleIntervalBuf[KeySize(TxtFieldKey::kSleepyIdleInterval) + ValSize(TxtFieldKey::kSleepyIdleInterval) + 2]; + char sleepyActiveIntervalBuf[KeySize(TxtFieldKey::kSleepyActiveInterval) + ValSize(TxtFieldKey::kSleepyActiveInterval) + 2]; char tcpSupportedBuf[KeySize(TxtFieldKey::kTcpSupported) + ValSize(TxtFieldKey::kTcpSupported) + 2]; }; template @@ -227,13 +226,13 @@ class AdvertiserMinMdns : public ServiceAdvertiser, "MRP retry interval idle value exceeds allowed range of 1 hour, using maximum available"); mrp.mIdleRetransTimeout = kMaxRetryInterval; } - size_t writtenCharactersNumber = snprintf(storage.mrpRetryIntervalIdleBuf, sizeof(storage.mrpRetryIntervalIdleBuf), - "CRI=%" PRIu32, mrp.mIdleRetransTimeout.count()); + size_t writtenCharactersNumber = snprintf(storage.sleepyIdleIntervalBuf, sizeof(storage.sleepyIdleIntervalBuf), + "SII=%" PRIu32, mrp.mIdleRetransTimeout.count()); VerifyOrReturnError((writtenCharactersNumber > 0) && - (writtenCharactersNumber < sizeof(storage.mrpRetryIntervalIdleBuf)), + (writtenCharactersNumber < sizeof(storage.sleepyIdleIntervalBuf)), CHIP_ERROR_INVALID_STRING_LENGTH); - txtFields[numTxtFields++] = storage.mrpRetryIntervalIdleBuf; + txtFields[numTxtFields++] = storage.sleepyIdleIntervalBuf; } { @@ -243,13 +242,12 @@ class AdvertiserMinMdns : public ServiceAdvertiser, "MRP retry interval active value exceeds allowed range of 1 hour, using maximum available"); mrp.mActiveRetransTimeout = kMaxRetryInterval; } - size_t writtenCharactersNumber = - snprintf(storage.mrpRetryIntervalActiveBuf, sizeof(storage.mrpRetryIntervalActiveBuf), "CRA=%" PRIu32, - mrp.mActiveRetransTimeout.count()); + size_t writtenCharactersNumber = snprintf(storage.sleepyActiveIntervalBuf, sizeof(storage.sleepyActiveIntervalBuf), + "SAI=%" PRIu32, mrp.mActiveRetransTimeout.count()); VerifyOrReturnError((writtenCharactersNumber > 0) && - (writtenCharactersNumber < sizeof(storage.mrpRetryIntervalActiveBuf)), + (writtenCharactersNumber < sizeof(storage.sleepyActiveIntervalBuf)), CHIP_ERROR_INVALID_STRING_LENGTH); - txtFields[numTxtFields++] = storage.mrpRetryIntervalActiveBuf; + txtFields[numTxtFields++] = storage.sleepyActiveIntervalBuf; } } if (params.GetTcpSupported().HasValue()) diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index b4a0e4bf258f83..b0733a6519ff30 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -287,9 +287,9 @@ CHIP_ERROR CopyTxtRecord(TxtFieldKey key, char * buffer, size_t bufferLen, const { case TxtFieldKey::kTcpSupported: return CopyTextRecordValue(buffer, bufferLen, params.GetTcpSupported()); - case TxtFieldKey::kMrpRetryIntervalIdle: - case TxtFieldKey::kMrpRetryIntervalActive: - return CopyTextRecordValue(buffer, bufferLen, params.GetMRPConfig(), key == TxtFieldKey::kMrpRetryIntervalIdle); + case TxtFieldKey::kSleepyIdleInterval: + case TxtFieldKey::kSleepyActiveInterval: + return CopyTextRecordValue(buffer, bufferLen, params.GetMRPConfig(), key == TxtFieldKey::kSleepyIdleInterval); default: return CHIP_ERROR_INVALID_ARGUMENT; } @@ -537,8 +537,8 @@ CHIP_ERROR DiscoveryImplPlatform::Advertise(const OperationalAdvertisingParamete { PREPARE_RECORDS(Operational); - ADD_TXT_RECORD(MrpRetryIntervalIdle); - ADD_TXT_RECORD(MrpRetryIntervalActive); + ADD_TXT_RECORD(SleepyIdleInterval); + ADD_TXT_RECORD(SleepyActiveInterval); ADD_TXT_RECORD(TcpSupported); ADD_PTR_RECORD(CompressedFabricId); @@ -555,8 +555,8 @@ CHIP_ERROR DiscoveryImplPlatform::Advertise(const CommissionAdvertisingParameter ADD_TXT_RECORD(VendorProduct); ADD_TXT_RECORD(DeviceType); ADD_TXT_RECORD(DeviceName); - ADD_TXT_RECORD(MrpRetryIntervalIdle); - ADD_TXT_RECORD(MrpRetryIntervalActive); + ADD_TXT_RECORD(SleepyIdleInterval); + ADD_TXT_RECORD(SleepyActiveInterval); ADD_TXT_RECORD(TcpSupported); ADD_PTR_RECORD(VendorId); diff --git a/src/lib/dnssd/Resolver.h b/src/lib/dnssd/Resolver.h index e11822099d9f31..44887865a21cc9 100644 --- a/src/lib/dnssd/Resolver.h +++ b/src/lib/dnssd/Resolver.h @@ -68,7 +68,7 @@ struct ResolvedNodeData bool IsDeviceTreatedAsSleepy(const ReliableMessageProtocolConfig * defaultMRPConfig) const { - // If either retry interval (Idle - CRI, Active - CRA) has a value and that value is greater + // If either sleepy interval (Idle - SII, Active - SAI) has a value and that value is greater // than the value passed to this function, then the peer device will be treated as if it is // a Sleepy End Device (SED) return (mMrpRetryIntervalIdle.HasValue() && (mMrpRetryIntervalIdle.Value() > defaultMRPConfig->mIdleRetransTimeout)) || diff --git a/src/lib/dnssd/TxtFields.cpp b/src/lib/dnssd/TxtFields.cpp index b681e41cd41fc3..af9d7de02c013f 100644 --- a/src/lib/dnssd/TxtFields.cpp +++ b/src/lib/dnssd/TxtFields.cpp @@ -225,10 +225,10 @@ void FillNodeDataFromTxt(const ByteSpan & key, const ByteSpan & val, DiscoveredN case TxtFieldKey::kPairingHint: nodeData.pairingHint = Internal::GetPairingHint(val); break; - case TxtFieldKey::kMrpRetryIntervalIdle: + case TxtFieldKey::kSleepyIdleInterval: nodeData.mrpRetryIntervalIdle = Internal::GetRetryInterval(val); break; - case TxtFieldKey::kMrpRetryIntervalActive: + case TxtFieldKey::kSleepyActiveInterval: nodeData.mrpRetryIntervalActive = Internal::GetRetryInterval(val); break; case TxtFieldKey::kTcpSupported: @@ -243,10 +243,10 @@ void FillNodeDataFromTxt(const ByteSpan & key, const ByteSpan & value, ResolvedN { switch (Internal::GetTxtFieldKey(key)) { - case TxtFieldKey::kMrpRetryIntervalIdle: + case TxtFieldKey::kSleepyIdleInterval: nodeData.mMrpRetryIntervalIdle = Internal::GetRetryInterval(value); break; - case TxtFieldKey::kMrpRetryIntervalActive: + case TxtFieldKey::kSleepyActiveInterval: nodeData.mMrpRetryIntervalActive = Internal::GetRetryInterval(value); break; case TxtFieldKey::kTcpSupported: diff --git a/src/lib/dnssd/TxtFields.h b/src/lib/dnssd/TxtFields.h index d32daea3d96982..7605923afaeb37 100644 --- a/src/lib/dnssd/TxtFields.h +++ b/src/lib/dnssd/TxtFields.h @@ -31,8 +31,8 @@ namespace Dnssd { using namespace System::Clock::Literals; // Operational node TXT entries -static constexpr size_t kKeyMrpRetryIntervalIdleMaxLength = 7; // [CRI] 0-3600000 -static constexpr size_t kKeyMrpRetryIntervalActiveMaxLength = 7; // [CRA] 0-3600000 +static constexpr size_t kKeySleepyIdleIntervalMaxLength = 7; // [SII] 0-3600000 +static constexpr size_t kKeySleepyActiveIntervalMaxLength = 7; // [SAI] 0-3600000 static constexpr System::Clock::Milliseconds32 kMaxRetryInterval = 3600000_ms32; static constexpr size_t kKeyTcpSupportedMaxLength = 1; @@ -66,8 +66,8 @@ enum class TxtFieldKey : uint8_t kRotatingDeviceId, kPairingInstruction, kPairingHint, - kMrpRetryIntervalIdle, - kMrpRetryIntervalActive, + kSleepyIdleInterval, + kSleepyActiveInterval, kTcpSupported, kCount, }; @@ -92,8 +92,8 @@ constexpr const TxtFieldInfo txtFieldInfo[static_cast(TxtFieldKey::kCoun { TxtFieldKey::kRotatingDeviceId, kKeyRotatingDeviceIdMaxLength, "RI", TxtKeyUse::kCommission }, { TxtFieldKey::kPairingInstruction, kKeyPairingInstructionMaxLength, "PI", TxtKeyUse::kCommission }, { TxtFieldKey::kPairingHint, kKeyPairingHintMaxLength, "PH", TxtKeyUse::kCommission }, - { TxtFieldKey::kMrpRetryIntervalIdle, kKeyMrpRetryIntervalIdleMaxLength, "CRI", TxtKeyUse::kCommon }, - { TxtFieldKey::kMrpRetryIntervalActive, kKeyMrpRetryIntervalActiveMaxLength, "CRA", TxtKeyUse::kCommon }, + { TxtFieldKey::kSleepyIdleInterval, kKeySleepyIdleIntervalMaxLength, "SII", TxtKeyUse::kCommon }, + { TxtFieldKey::kSleepyActiveInterval, kKeySleepyActiveIntervalMaxLength, "SAI", TxtKeyUse::kCommon }, { TxtFieldKey::kTcpSupported, kKeyTcpSupportedMaxLength, "T", TxtKeyUse::kCommon }, }; #ifdef CHIP_CONFIG_TEST diff --git a/src/lib/dnssd/minimal_mdns/tests/TestAdvertiser.cpp b/src/lib/dnssd/minimal_mdns/tests/TestAdvertiser.cpp index 3acfa4a88951de..0741cd6933b4fb 100644 --- a/src/lib/dnssd/minimal_mdns/tests/TestAdvertiser.cpp +++ b/src/lib/dnssd/minimal_mdns/tests/TestAdvertiser.cpp @@ -72,13 +72,14 @@ FullQName kCompressedIdSubName2 = FullQName(kCompressedIdSubPart PtrResourceRecord ptrServiceSubCompressedId1 = PtrResourceRecord(kDnsSdQueryName, kCompressedIdSubName1); PtrResourceRecord ptrServiceSubCompressedId2 = PtrResourceRecord(kDnsSdQueryName, kCompressedIdSubName2); -OperationalAdvertisingParameters operationalParams1 = OperationalAdvertisingParameters() - .SetPeerId(kPeerId1) - .SetMac(ByteSpan(kMac)) - .SetPort(CHIP_PORT) - .EnableIpV4(true) - .SetTcpSupported(chip::Optional(false)) - .SetMRPConfig(ReliableMessageProtocolConfig(32_ms32, 33_ms32)); +OperationalAdvertisingParameters operationalParams1 = + OperationalAdvertisingParameters() + .SetPeerId(kPeerId1) + .SetMac(ByteSpan(kMac)) + .SetPort(CHIP_PORT) + .EnableIpV4(true) + .SetTcpSupported(chip::Optional(false)) + .SetMRPConfig(ReliableMessageProtocolConfig(32_ms32, 30_ms32)); // Match SII, SAI below OperationalAdvertisingParameters operationalParams2 = OperationalAdvertisingParameters().SetPeerId(kPeerId2).SetMac(ByteSpan(kMac)).SetPort(CHIP_PORT).EnableIpV4(true); OperationalAdvertisingParameters operationalParams3 = @@ -89,7 +90,7 @@ OperationalAdvertisingParameters operationalParams5 = OperationalAdvertisingParameters().SetPeerId(kPeerId5).SetMac(ByteSpan(kMac)).SetPort(CHIP_PORT).EnableIpV4(true); OperationalAdvertisingParameters operationalParams6 = OperationalAdvertisingParameters().SetPeerId(kPeerId6).SetMac(ByteSpan(kMac)).SetPort(CHIP_PORT).EnableIpV4(true); -const QNamePart txtOperational1Parts[] = { "CRI=32", "CRA=33", "T=0" }; +const QNamePart txtOperational1Parts[] = { "SII=32", "SAI=30", "T=0" }; PtrResourceRecord ptrOperationalService = PtrResourceRecord(kDnsSdQueryName, kMatterOperationalQueryName); PtrResourceRecord ptrOperational1 = PtrResourceRecord(kMatterOperationalQueryName, kInstanceName1); SrvResourceRecord srvOperational1 = SrvResourceRecord(kInstanceName1, kHostnameName, CHIP_PORT); @@ -182,7 +183,7 @@ CommissionAdvertisingParameters commissionableNodeParamsLargeEnhanced = .SetMRPConfig(ReliableMessageProtocolConfig(3600000_ms32, 3600005_ms32)); QNamePart txtCommissionableNodeParamsLargeEnhancedParts[] = { "D=22", "VP=555+897", "CM=2", "DT=70000", "DN=testy-test", "RI=id_that_spins", "PI=Pair me", "PH=3", - "CRA=3600000", "CRI=3600000", "T=1" }; + "SAI=3600000", "SII=3600000", "T=1" }; FullQName txtCommissionableNodeParamsLargeEnhancedName = FullQName(txtCommissionableNodeParamsLargeEnhancedParts); TxtResourceRecord txtCommissionableNodeParamsLargeEnhanced = TxtResourceRecord(instanceName, txtCommissionableNodeParamsLargeEnhancedName); diff --git a/src/lib/dnssd/platform/tests/TestPlatform.cpp b/src/lib/dnssd/platform/tests/TestPlatform.cpp index 137060a598a563..e8498ce2947b8a 100644 --- a/src/lib/dnssd/platform/tests/TestPlatform.cpp +++ b/src/lib/dnssd/platform/tests/TestPlatform.cpp @@ -51,7 +51,7 @@ OperationalAdvertisingParameters operationalParams2 = OperationalAdvertisingPara .SetMac(ByteSpan(kMac)) .SetPort(CHIP_PORT) .EnableIpV4(true) - .SetMRPConfig({ 32_ms32, 33_ms32 }) + .SetMRPConfig({ 32_ms32, 30_ms32 }) // SII and SAI to match below .SetTcpSupported(Optional(true)); test::ExpectedCall operationalCall2 = test::ExpectedCall() .SetProtocol(DnssdServiceProtocol::kDnssdProtocolTcp) @@ -59,8 +59,8 @@ test::ExpectedCall operationalCall2 = test::ExpectedCall() .SetInstanceName("5555666677778888-1212343456567878") .SetHostName(host) .AddSubtype("_I5555666677778888") - .AddTxt("CRI", "32") - .AddTxt("CRA", "33") + .AddTxt("SII", "32") + .AddTxt("SAI", "30") .AddTxt("T", "1"); CommissionAdvertisingParameters commissionableNodeParamsSmall = @@ -110,8 +110,8 @@ test::ExpectedCall commissionableLargeBasic = test::ExpectedCall() .AddTxt("PI", "Pair me") .AddTxt("PH", "3") .AddTxt("T", "1") - .AddTxt("CRI", "3600000") - .AddTxt("CRA", "3600000") + .AddTxt("SII", "3600000") + .AddTxt("SAI", "3600000") .AddSubtype("_S2") .AddSubtype("_L22") .AddSubtype("_V555") diff --git a/src/lib/dnssd/tests/TestTxtFields.cpp b/src/lib/dnssd/tests/TestTxtFields.cpp index 90d96d1b176a59..5b97a618724dd5 100644 --- a/src/lib/dnssd/tests/TestTxtFields.cpp +++ b/src/lib/dnssd/tests/TestTxtFields.cpp @@ -68,11 +68,11 @@ void TestGetTxtFieldKey(nlTestSuite * inSuite, void * inContext) strcpy(key, "PH"); NL_TEST_ASSERT(inSuite, GetTxtFieldKey(GetSpan(key)) == TxtFieldKey::kPairingHint); - strcpy(key, "CRI"); - NL_TEST_ASSERT(inSuite, GetTxtFieldKey(GetSpan(key)) == TxtFieldKey::kMrpRetryIntervalIdle); + strcpy(key, "SII"); + NL_TEST_ASSERT(inSuite, GetTxtFieldKey(GetSpan(key)) == TxtFieldKey::kSleepyIdleInterval); - strcpy(key, "CRA"); - NL_TEST_ASSERT(inSuite, GetTxtFieldKey(GetSpan(key)) == TxtFieldKey::kMrpRetryIntervalActive); + strcpy(key, "SAI"); + NL_TEST_ASSERT(inSuite, GetTxtFieldKey(GetSpan(key)) == TxtFieldKey::kSleepyActiveInterval); strcpy(key, "T"); NL_TEST_ASSERT(inSuite, GetTxtFieldKey(GetSpan(key)) == TxtFieldKey::kTcpSupported); @@ -404,23 +404,23 @@ void ResetRetryIntervalActive(ResolvedNodeData & nodeData) nodeData.mMrpRetryIntervalActive.ClearValue(); } -// Test CRI +// Test SAI (formally CRI) template -void TxtFieldMrpRetryIntervalIdle(nlTestSuite * inSuite, void * inContext) +void TxtFieldSleepyIdleInterval(nlTestSuite * inSuite, void * inContext) { char key[4]; char val[16]; NodeData nodeData; // Minimum - strcpy(key, "CRI"); + strcpy(key, "SII"); strcpy(val, "1"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, nodeData.GetMrpRetryIntervalIdle().HasValue()); NL_TEST_ASSERT(inSuite, nodeData.GetMrpRetryIntervalIdle().Value() == 1_ms32); // Maximum - strcpy(key, "CRI"); + strcpy(key, "SII"); strcpy(val, "3600000"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, nodeData.GetMrpRetryIntervalIdle().HasValue()); @@ -430,60 +430,60 @@ void TxtFieldMrpRetryIntervalIdle(nlTestSuite * inSuite, void * inContext) ResetRetryIntervalIdle(nodeData); NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(nodeData)); - // Invalid CRI - negative value - strcpy(key, "CRI"); + // Invalid SII - negative value + strcpy(key, "SII"); strcpy(val, "-1"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalIdle().HasValue()); - // Invalid CRI - greater than maximum - strcpy(key, "CRI"); + // Invalid SII - greater than maximum + strcpy(key, "SII"); strcpy(val, "3600001"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalIdle().HasValue()); - // Invalid CRI - much greater than maximum - strcpy(key, "CRI"); + // Invalid SII - much greater than maximum + strcpy(key, "SII"); strcpy(val, "1095216660481"); // 0xFF00000001 == 1 (mod 2^32) FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalIdle().HasValue()); - // Invalid CRI - hexadecimal value - strcpy(key, "CRI"); + // Invalid SII - hexadecimal value + strcpy(key, "SII"); strcpy(val, "0x20"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalIdle().HasValue()); - // Invalid CRI - leading zeros - strcpy(key, "CRI"); + // Invalid SII - leading zeros + strcpy(key, "SII"); strcpy(val, "0700"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalIdle().HasValue()); - // Invalid CRI - text at the end - strcpy(key, "CRI"); + // Invalid SII - text at the end + strcpy(key, "SII"); strcpy(val, "123abc"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalIdle().HasValue()); } -// Test CRA +// Test SAI (formerly CRA) template -void TxtFieldMrpRetryIntervalActive(nlTestSuite * inSuite, void * inContext) +void TxtFieldSleepyActiveInterval(nlTestSuite * inSuite, void * inContext) { char key[4]; char val[16]; NodeData nodeData; // Minimum - strcpy(key, "CRA"); + strcpy(key, "SAI"); strcpy(val, "1"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, nodeData.GetMrpRetryIntervalActive().HasValue()); NL_TEST_ASSERT(inSuite, nodeData.GetMrpRetryIntervalActive().Value() == 1_ms32); // Maximum - strcpy(key, "CRA"); + strcpy(key, "SAI"); strcpy(val, "3600000"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, nodeData.GetMrpRetryIntervalActive().HasValue()); @@ -493,38 +493,38 @@ void TxtFieldMrpRetryIntervalActive(nlTestSuite * inSuite, void * inContext) ResetRetryIntervalActive(nodeData); NL_TEST_ASSERT(inSuite, NodeDataIsEmpty(nodeData)); - // Invalid CRA - negative value - strcpy(key, "CRA"); + // Invalid SAI - negative value + strcpy(key, "SAI"); strcpy(val, "-1"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalActive().HasValue()); - // Invalid CRA - greater than maximum - strcpy(key, "CRA"); + // Invalid SAI - greater than maximum + strcpy(key, "SAI"); strcpy(val, "3600001"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalActive().HasValue()); - // Invalid CRA - much greater than maximum - strcpy(key, "CRA"); + // Invalid SAI - much greater than maximum + strcpy(key, "SAI"); strcpy(val, "1095216660481"); // 0xFF00000001 == 1 (mod 2^32) FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalActive().HasValue()); - // Invalid CRA - hexadecimal value - strcpy(key, "CRA"); + // Invalid SAI - hexadecimal value + strcpy(key, "SAI"); strcpy(val, "0x20"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalActive().HasValue()); - // Invalid CRA - leading zeros - strcpy(key, "CRA"); + // Invalid SAI - leading zeros + strcpy(key, "SAI"); strcpy(val, "0700"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalActive().HasValue()); - // Invalid CRA - text at the end - strcpy(key, "CRA"); + // Invalid SAI - text at the end + strcpy(key, "SAI"); strcpy(val, "123abc"); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.GetMrpRetryIntervalActive().HasValue()); @@ -575,13 +575,13 @@ void TestIsDeviceSleepyIdle(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, !nodeData.IsDeviceTreatedAsSleepy(&defaultMRPConfig)); // If the interval is the default value, the device is not sleepy - strcpy(key, "CRI"); + strcpy(key, "SII"); sprintf(val, "%d", static_cast(CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL.count())); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.IsDeviceTreatedAsSleepy(&defaultMRPConfig)); // If the interval is greater than the default value, the device is sleepy - sprintf(key, "CRI"); + sprintf(key, "SII"); sprintf(val, "%d", static_cast(CHIP_CONFIG_MRP_DEFAULT_IDLE_RETRY_INTERVAL.count() + 1)); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, nodeData.IsDeviceTreatedAsSleepy(&defaultMRPConfig)); @@ -601,13 +601,13 @@ void TestIsDeviceSleepyActive(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, !nodeData.IsDeviceTreatedAsSleepy(&defaultMRPConfig)); // If the interval is the default value, the device is not sleepy - sprintf(key, "CRA"); + sprintf(key, "SAI"); sprintf(val, "%d", static_cast(CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL.count())); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, !nodeData.IsDeviceTreatedAsSleepy(&defaultMRPConfig)); // If the interval is greater than the default value, the device is sleepy - strcpy(key, "CRA"); + strcpy(key, "SAI"); sprintf(val, "%d", static_cast(CHIP_CONFIG_MRP_DEFAULT_ACTIVE_RETRY_INTERVAL.count() + 1)); FillNodeDataFromTxt(GetSpan(key), GetSpan(val), nodeData); NL_TEST_ASSERT(inSuite, nodeData.IsDeviceTreatedAsSleepy(&defaultMRPConfig)); @@ -626,13 +626,13 @@ const nlTest sTests[] = { NL_TEST_DEF("TxtFieldPairingHint", TestGetPairingHint), // NL_TEST_DEF("TxtFieldPairingInstruction", TestGetPairingInstruction), // NL_TEST_DEF("TxtFieldFillDiscoveredNodeDataFromTxt", TestFillDiscoveredNodeDataFromTxt), // - NL_TEST_DEF("TxtDiscoveredFieldMrpRetryIntervalIdle", TxtFieldMrpRetryIntervalIdle), - NL_TEST_DEF("TxtDiscoveredFieldMrpRetryIntervalActive", TxtFieldMrpRetryIntervalActive), + NL_TEST_DEF("TxtDiscoveredFieldMrpRetryIntervalIdle", TxtFieldSleepyIdleInterval), + NL_TEST_DEF("TxtDiscoveredFieldMrpRetryIntervalActive", TxtFieldSleepyActiveInterval), NL_TEST_DEF("TxtDiscoveredFieldTcpSupport", (TxtFieldTcpSupport) ), NL_TEST_DEF("TxtDiscoveredIsDeviceSleepyIdle", TestIsDeviceSleepyIdle), NL_TEST_DEF("TxtDiscoveredIsDeviceSleepyActive", TestIsDeviceSleepyActive), - NL_TEST_DEF("TxtResolvedFieldMrpRetryIntervalIdle", TxtFieldMrpRetryIntervalIdle), - NL_TEST_DEF("TxtResolvedFieldMrpRetryIntervalActive", TxtFieldMrpRetryIntervalActive), + NL_TEST_DEF("TxtResolvedFieldMrpRetryIntervalIdle", TxtFieldSleepyIdleInterval), + NL_TEST_DEF("TxtResolvedFieldMrpRetryIntervalActive", TxtFieldSleepyActiveInterval), NL_TEST_DEF("TxtResolvedFieldTcpSupport", (TxtFieldTcpSupport) ), NL_TEST_DEF("TxtResolvedIsDeviceSleepyIdle", TestIsDeviceSleepyIdle), NL_TEST_DEF("TxtResolvedIsDeviceSleepyActive", TestIsDeviceSleepyActive), From e41bcd2949cd655c260299aa57f49d27705e2297 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 9 May 2022 17:11:04 -0400 Subject: [PATCH 09/26] Stop having CHIPTool depend on in-framework key generation. (#18221) Allows us to remove the in-framework key generation bits. --- .../commands/common/CHIPCommandBridge.mm | 3 +- .../CHIPTool.xcodeproj/project.pbxproj | 6 + .../Framework Helpers/DefaultsUtils.m | 16 +- .../CHIPTool/Framework Helpers/FabricKeys.h | 35 +++ .../CHIPTool/Framework Helpers/FabricKeys.m | 237 ++++++++++++++ .../Framework/CHIP/CHIPDeviceController.mm | 12 +- .../CHIP/CHIPOperationalCredentialsDelegate.h | 22 +- .../CHIPOperationalCredentialsDelegate.mm | 297 +----------------- .../Framework/CHIP/MatterControllerFactory.h | 18 +- .../Framework/CHIP/MatterControllerFactory.mm | 24 -- .../Framework/CHIPTests/CHIPClustersTests.m | 3 +- .../Framework/CHIPTests/CHIPControllerTests.m | 60 +--- .../Framework/CHIPTests/CHIPDeviceTests.m | 3 +- .../CHIPTests/CHIPXPCListenerSampleTests.m | 3 +- 14 files changed, 334 insertions(+), 405 deletions(-) create mode 100644 src/darwin/CHIPTool/CHIPTool/Framework Helpers/FabricKeys.h create mode 100644 src/darwin/CHIPTool/CHIPTool/Framework Helpers/FabricKeys.m diff --git a/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm b/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm index 22fa5258219d21..fc1072b3cc789e 100644 --- a/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm +++ b/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm @@ -55,10 +55,9 @@ constexpr const char * identities[] = { kIdentityAlpha, kIdentityBeta, kIdentityGamma }; for (size_t i = 0; i < ArraySize(identities); ++i) { - auto controllerParams = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nocSigner]; + auto controllerParams = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nocSigner ipk:ipk]; controllerParams.vendorId = chip::VendorId::TestVendor1; controllerParams.fabricId = i + 1; - controllerParams.ipk = ipk; // We're not sure whether we're creating a new fabric or using an // existing one, so just try both. diff --git a/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj b/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj index 8efc153410d354..6c115bb8e5cd7f 100644 --- a/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj +++ b/src/darwin/CHIPTool/CHIPTool.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 2C21071525D1A8F200DDA4AD /* MultiAdminViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C21071325D1A8F200DDA4AD /* MultiAdminViewController.m */; }; 2C460C2425D7594B000512D6 /* DeviceSelector.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C460C2325D7594B000512D6 /* DeviceSelector.m */; }; 2C460C3225D97CB3000512D6 /* UnpairDevicesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C460C3025D97CB3000512D6 /* UnpairDevicesViewController.m */; }; + 51C8E3FB28261DCF00D47D00 /* FabricKeys.m in Sources */ = {isa = PBXBuildFile; fileRef = 51C8E3FA28261DCF00D47D00 /* FabricKeys.m */; }; 991DC091247747F500C13860 /* EnumerateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 991DC090247747F500C13860 /* EnumerateViewController.m */; }; 997A639C253F93F7005C64E6 /* CHIP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 997A639B253F93F7005C64E6 /* CHIP.framework */; }; 997A639D253F93F7005C64E6 /* CHIP.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 997A639B253F93F7005C64E6 /* CHIP.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -62,6 +63,8 @@ 2C460C2325D7594B000512D6 /* DeviceSelector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeviceSelector.m; sourceTree = ""; }; 2C460C3025D97CB3000512D6 /* UnpairDevicesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UnpairDevicesViewController.m; sourceTree = ""; }; 2C460C3125D97CB3000512D6 /* UnpairDevicesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnpairDevicesViewController.h; sourceTree = ""; }; + 51C8E3F928261DCF00D47D00 /* FabricKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FabricKeys.h; sourceTree = ""; }; + 51C8E3FA28261DCF00D47D00 /* FabricKeys.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FabricKeys.m; sourceTree = ""; }; 991DC08F247747F500C13860 /* EnumerateViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnumerateViewController.h; sourceTree = ""; }; 991DC090247747F500C13860 /* EnumerateViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EnumerateViewController.m; sourceTree = ""; }; 997A639B253F93F7005C64E6 /* CHIP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CHIP.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -245,6 +248,8 @@ B232D8C0251A0EE200792CB4 /* Framework Helpers */ = { isa = PBXGroup; children = ( + 51C8E3F928261DCF00D47D00 /* FabricKeys.h */, + 51C8E3FA28261DCF00D47D00 /* FabricKeys.m */, B2946A9924C9A7BF005C87D0 /* DefaultsUtils.h */, B2946A9A24C9A7BF005C87D0 /* DefaultsUtils.m */, ); @@ -401,6 +406,7 @@ B243A6692513A73600E56FEA /* RootViewController.m in Sources */, B204A632244E1D0700C7C0E1 /* main.m in Sources */, B204A624244E1D0600C7C0E1 /* SceneDelegate.m in Sources */, + 51C8E3FB28261DCF00D47D00 /* FabricKeys.m in Sources */, B2946A4224C99D53005C87D0 /* WiFiViewController.m in Sources */, 0CA0E0CF248599BB009087B9 /* OnOffViewController.m in Sources */, ); diff --git a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m index ac6bc504611561..6538a0f89a5251 100644 --- a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m +++ b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/DefaultsUtils.m @@ -16,6 +16,7 @@ */ #import "DefaultsUtils.h" +#import "FabricKeys.h" NSString * const kCHIPToolDefaultsDomain = @"com.apple.chiptool"; NSString * const kNetworkSSIDDefaultsKey = @"networkSSID"; @@ -81,7 +82,12 @@ void CHIPSetNextAvailableDeviceID(uint64_t id) return; } - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; + __auto_type * keys = [[FabricKeys alloc] init]; + if (keys == nil) { + return; + } + + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:keys ipk:keys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; @@ -98,11 +104,17 @@ void CHIPSetNextAvailableDeviceID(uint64_t id) CHIPDeviceController * CHIPRestartController(CHIPDeviceController * controller) { + __auto_type * keys = [[FabricKeys alloc] init]; + if (keys == nil) { + NSLog(@"No keys, can't restart controller"); + return controller; + } + NSLog(@"Shutting down the stack"); [controller shutdown]; NSLog(@"Starting up the stack"); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:keys ipk:keys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; diff --git a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/FabricKeys.h b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/FabricKeys.h new file mode 100644 index 00000000000000..2d60189ad76241 --- /dev/null +++ b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/FabricKeys.h @@ -0,0 +1,35 @@ +/** + * 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 + +#import +#import + +/** + * Management of the CA key and IPK for our fabric. + */ + +NS_ASSUME_NONNULL_BEGIN + +@interface FabricKeys : NSObject + +@property (readonly, nonatomic, strong) NSData * ipk; + +- (instancetype)init; +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/CHIPTool/CHIPTool/Framework Helpers/FabricKeys.m b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/FabricKeys.m new file mode 100644 index 00000000000000..6b0eadd9f503a3 --- /dev/null +++ b/src/darwin/CHIPTool/CHIPTool/Framework Helpers/FabricKeys.m @@ -0,0 +1,237 @@ +/** + * 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 "FabricKeys.h" + +#import + +@interface FabricKeys () +@property (readonly) SecKeyRef privateKey; +@property (readonly) SecKeyRef publicKey; +@end + +static const NSString * kCHIPIPKKeyChainLabel = @"matter-tool.nodeopcerts.IPK:0"; +static const NSString * kCHIPCAKeyChainLabel = @"matter-tool.nodeopcerts.CA:0"; + +@implementation FabricKeys + ++ (NSDictionary *)ipkParams +{ + return @{ + (__bridge NSString *) kSecClass : (__bridge NSString *) kSecClassKey, + (__bridge NSString *) kSecAttrApplicationLabel : kCHIPIPKKeyChainLabel, + (__bridge NSString *) kSecAttrKeyClass : (__bridge NSString *) kSecAttrKeyClassSymmetric, + }; +} + ++ (NSData *)loadIPK +{ + NSMutableDictionary * query = [[NSMutableDictionary alloc] initWithDictionary:[FabricKeys ipkParams]]; + query[(__bridge NSString *) kSecReturnData] = @(YES); + + // The CFDataRef we get from SecItemCopyMatching allocates its buffer in a + // way that zeroes it when deallocated. + CFDataRef keyDataRef; + OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef) query, (CFTypeRef *) &keyDataRef); + if (status != errSecSuccess || keyDataRef == nil) { + NSLog(@"Did not find IPK in the keychain"); + return nil; + } + + NSLog(@"Found an existing IPK in the keychain"); + NSData * keyData = CFBridgingRelease(keyDataRef); + + return [[NSData alloc] initWithBase64EncodedData:keyData options:0]; +} + ++ (NSData *)generateIPK +{ + NSMutableDictionary * query = [[NSMutableDictionary alloc] initWithDictionary:[FabricKeys ipkParams]]; + + // First, delete any existing item, since otherwise trying to add the new item + // later will fail. Ignore delete failure, since we might not have had the + // item at all. + SecItemDelete((__bridge CFDictionaryRef) query); + + // Generate an IPK. For now, hardcoded to 16 bytes until the + // framework exposes this constant. + const size_t ipk_size = 16; + NSMutableData * ipkData = [NSMutableData dataWithLength:ipk_size]; + if (ipkData == nil) { + return nil; + } + + int status = SecRandomCopyBytes(kSecRandomDefault, ipk_size, [ipkData mutableBytes]); + if (status != errSecSuccess) { + NSLog(@"Failed to generate IPK : %d", status); + return nil; + } + + query[(__bridge NSString *) kSecValueData] = [ipkData base64EncodedDataWithOptions:0]; + + OSStatus addStatus = SecItemAdd((__bridge CFDictionaryRef) query, NULL); + if (addStatus != errSecSuccess) { + NSLog(@"Failed to store IPK : %d", addStatus); + return nil; + } + + return ipkData; +} + ++ (NSDictionary *)privateKeyParams +{ + return @{ + (__bridge NSString *) kSecClass : (__bridge NSString *) kSecClassKey, + (__bridge NSString *) kSecAttrApplicationLabel : kCHIPCAKeyChainLabel, + // We're storing a base-64 encoding of some opaque thing that represents + // our keypair. It's not really a public or private key; claim it's a + // symmetric key. + (__bridge NSString *) kSecAttrKeyClass : (__bridge NSString *) kSecAttrKeyClassSymmetric, + }; +} + ++ (NSDictionary *)privateKeyCreationParams +{ + // For now harcoded to 256 bits until the framework exposes this constant. + const size_t keySizeInBits = 256; + + return @{ + (__bridge NSString *) kSecAttrKeyClass : (__bridge NSString *) kSecAttrKeyClassPrivate, + (__bridge NSString *) kSecAttrKeyType : (__bridge NSNumber *) kSecAttrKeyTypeECSECPrimeRandom, + (__bridge NSString *) kSecAttrKeySizeInBits : @(keySizeInBits), + (__bridge NSString *) kSecAttrIsPermanent : @(NO) + }; +} + ++ (SecKeyRef)loadCAPrivateKey +{ + NSMutableDictionary * query = [[NSMutableDictionary alloc] initWithDictionary:[FabricKeys privateKeyParams]]; + query[(__bridge NSString *) kSecReturnData] = @(YES); + + // The CFDataRef we get from SecItemCopyMatching allocates its buffer in a + // way that zeroes it when deallocated. + CFDataRef keyDataRef; + OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef) query, (CFTypeRef *) &keyDataRef); + if (status != errSecSuccess || keyDataRef == nil) { + NSLog(@"Did not find CA key in the keychain"); + return NULL; + } + + NSLog(@"Found an existing CA key in the keychain"); + NSData * encodedKey = CFBridgingRelease(keyDataRef); + + NSData * keyData = [[NSData alloc] initWithBase64EncodedData:encodedKey options:0]; + if (keyData == nil) { + NSLog(@"Could not base64-decode CA key"); + return NULL; + } + + CFErrorRef error = NULL; + SecKeyRef key = SecKeyCreateWithData( + (__bridge CFDataRef) keyData, (__bridge CFDictionaryRef)[FabricKeys privateKeyCreationParams], &error); + if (error) { + NSLog(@"Could not reconstruct private key %@", (__bridge NSError *) error); + return NULL; + } + + return key; +} + ++ (SecKeyRef)generateCAPrivateKey +{ + NSMutableDictionary * query = [[NSMutableDictionary alloc] initWithDictionary:[FabricKeys privateKeyParams]]; + + // First, delete any existing item, since otherwise trying to add the new item + // later will fail. Ignore delete failure, since we might not have had the + // item at all. + SecItemDelete((__bridge CFDictionaryRef) query); + + CFErrorRef error = NULL; + SecKeyRef key = SecKeyCreateRandomKey((__bridge CFDictionaryRef)[FabricKeys privateKeyCreationParams], &error); + if (error) { + NSLog(@"Could not generate private key: %@", (__bridge NSError *) error); + return NULL; + } + + NSData * keyData = (__bridge_transfer NSData *) SecKeyCopyExternalRepresentation(key, &error); + if (error) { + NSLog(@"Could not get key external representation: %@", (__bridge NSError *) error); + CFRelease(key); + return NULL; + } + + query[(__bridge NSString *) kSecValueData] = [keyData base64EncodedDataWithOptions:0]; + + OSStatus status = SecItemAdd((__bridge CFDictionaryRef) query, NULL); + if (status != errSecSuccess) { + NSLog(@"Failed to store private key : %d", status); + CFRelease(key); + return NULL; + } + + return key; +} + +- (instancetype)init +{ + if (!(self = [super init])) { + return nil; + } + + if (!(_ipk = [FabricKeys loadIPK])) { + if (!(_ipk = [FabricKeys generateIPK])) { + return nil; + } + } + + if (!(_privateKey = [FabricKeys loadCAPrivateKey])) { + if (!(_privateKey = [FabricKeys generateCAPrivateKey])) { + return nil; + } + } + + _publicKey = SecKeyCopyPublicKey(_privateKey); + return self; +} + +- (NSData *)ECDSA_sign_hash:(NSData *)hash +{ + CFErrorRef error = NULL; + CFDataRef outData + = SecKeyCreateSignature(_privateKey, kSecKeyAlgorithmECDSASignatureRFC4754, (__bridge CFDataRef) hash, &error); + + if (error != noErr) { + NSLog(@"Failed to sign cert: %@", (__bridge NSError *) error); + } + return (__bridge_transfer NSData *) outData; +} + +- (SecKeyRef)pubkey +{ + return self.publicKey; +} + +- (void)dealloc +{ + if (_publicKey) { + CFRelease(_publicKey); + } + + if (_privateKey) { + CFRelease(_privateKey); + } +} +@end diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.mm b/src/darwin/Framework/CHIP/CHIPDeviceController.mm index c59b4def0b3753..b3dc9ca8345abd 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.mm +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.mm @@ -168,11 +168,9 @@ - (BOOL)startup:(CHIPDeviceControllerStartupParams *)startupParams CHIP_ERROR errorCode = CHIP_ERROR_INCORRECT_STATE; // create a CHIPP256KeypairBridge here and pass it to the operationalCredentialsDelegate - std::unique_ptr nativeBridge; - if (startupParams.rootCAKeypair != nil) { - _keypairBridge.Init(startupParams.rootCAKeypair); - nativeBridge.reset(new chip::Crypto::CHIPP256KeypairNativeBridge(_keypairBridge)); - } + _keypairBridge.Init(startupParams.rootCAKeypair); + auto nativeBridge = std::make_unique(_keypairBridge); + errorCode = _operationalCredentialsDelegate->init(_factory.storageDelegateBridge, std::move(nativeBridge), startupParams.ipk); if ([self checkForStartError:(CHIP_NO_ERROR == errorCode) logMsg:kErrorOperationalCredentialsInit]) { @@ -723,18 +721,18 @@ - (CHIP_ERROR)isRunningOnFabric:(chip::FabricInfo *)fabric isRunning:(BOOL *)isR @implementation CHIPDeviceControllerStartupParams -- (instancetype)initWithKeypair:(_Nullable id)rootCAKeypair +- (instancetype)initWithKeypair:(id)rootCAKeypair ipk:(NSData *)ipk { if (!(self = [super init])) { return nil; } _rootCAKeypair = rootCAKeypair; + _ipk = ipk; // Set various invalid values. _vendorId = chip::VendorId::Common; _fabricId = chip::kUndefinedFabricId; - _ipk = nil; return self; } diff --git a/src/darwin/Framework/CHIP/CHIPOperationalCredentialsDelegate.h b/src/darwin/Framework/CHIP/CHIPOperationalCredentialsDelegate.h index a5156b28d5cad5..05664812e4c086 100644 --- a/src/darwin/Framework/CHIP/CHIPOperationalCredentialsDelegate.h +++ b/src/darwin/Framework/CHIP/CHIPOperationalCredentialsDelegate.h @@ -37,14 +37,7 @@ class CHIPOperationalCredentialsDelegate : public chip::Controller::OperationalC ~CHIPOperationalCredentialsDelegate() {} - /** - * If nocSigner is not provided (is null), a keypair will be loaded from the - * keychain, or generated if nothing is present in the keychain. - * - * If ipk is not provided (is nil), an IPK will be loaded from the keychain, - * or generated if nothing is present in the keychain. - */ - CHIP_ERROR init(CHIPPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner, NSData * _Nullable ipk); + CHIP_ERROR init(CHIPPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner, NSData * ipk); CHIP_ERROR GenerateNOCChain(const chip::ByteSpan & csrElements, const chip::ByteSpan & csrNonce, const chip::ByteSpan & attestationSignature, const chip::ByteSpan & attestationChallenge, const chip::ByteSpan & DAC, @@ -68,16 +61,6 @@ class CHIPOperationalCredentialsDelegate : public chip::Controller::OperationalC const chip::Crypto::AesCcm128KeySpan GetIPK() { return mIPK.Span(); } private: - CHIP_ERROR GenerateRootCertKeys(); - CHIP_ERROR LoadRootCertKeysFromKeyChain(); - CHIP_ERROR DeleteRootCertKeysFromKeychain(); - - CHIP_ERROR GenerateIPK(); - CHIP_ERROR LoadIPKFromKeyChain(); - CHIP_ERROR DeleteIPKFromKeyChain(); - - CHIP_ERROR SetIssuerID(CHIPPersistentStorageDelegateBridge * storage); - bool ToChipEpochTime(uint32_t offset, uint32_t & epoch); ChipP256KeypairPtr mIssuerKey; @@ -86,8 +69,6 @@ class CHIPOperationalCredentialsDelegate : public chip::Controller::OperationalC chip::Crypto::AesCcm128Key mIPK; const uint32_t kCertificateValiditySecs = 365 * 24 * 60 * 60; - const NSString * kCHIPCAKeyChainLabel = @"matter.nodeopcerts.CA:0"; - const NSString * kCHIPIPKKeyChainLabel = @"matter.nodeopcerts.IPK:0"; CHIPPersistentStorageDelegateBridge * mStorage; @@ -96,7 +77,6 @@ class CHIPOperationalCredentialsDelegate : public chip::Controller::OperationalC chip::NodeId mNextRequestedNodeId = 1; chip::FabricId mNextFabricId = 1; bool mNodeIdRequested = false; - bool mForceRootCertRegeneration = false; }; NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/CHIPOperationalCredentialsDelegate.mm b/src/darwin/Framework/CHIP/CHIPOperationalCredentialsDelegate.mm index 9b1f3ab8f3b5d7..7b9090081d1f69 100644 --- a/src/darwin/Framework/CHIP/CHIPOperationalCredentialsDelegate.mm +++ b/src/darwin/Framework/CHIP/CHIPOperationalCredentialsDelegate.mm @@ -40,282 +40,22 @@ using namespace Credentials; using namespace Crypto; -static BOOL isRunningTests(void) -{ - NSDictionary * environment = [[NSProcessInfo processInfo] environment]; - return (environment[@"XCTestConfigurationFilePath"] != nil); -} - -static void ClearSecretData(NSMutableData * data) -{ - Crypto::ClearSecretData(static_cast([data mutableBytes]), [data length]); -} - CHIP_ERROR CHIPOperationalCredentialsDelegate::init( - CHIPPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner, NSData * _Nullable ipk) + CHIPPersistentStorageDelegateBridge * storage, ChipP256KeypairPtr nocSigner, NSData * ipk) { - if (storage == nil) { + if (storage == nil || nocSigner == nullptr || ipk == nil) { return CHIP_ERROR_INVALID_ARGUMENT; } mStorage = storage; - if (!nocSigner) { - CHIP_LOG_ERROR("CHIPOperationalCredentialsDelegate: No NOC Signer provided, using self managed keys"); - - mIssuerKey.reset(new chip::Crypto::P256Keypair()); - CHIP_ERROR err = LoadRootCertKeysFromKeyChain(); - - if (err != CHIP_NO_ERROR) { - // Generate keys if keys could not be loaded. Delete keys first, in - // case we have already-stored data that could not be loaded as - // keys; otherwise key generation will fail due to not being able to - // store in the keychain. - DeleteRootCertKeysFromKeychain(); - - err = GenerateRootCertKeys(); - } - - if (err != CHIP_NO_ERROR) { - CHIP_LOG_ERROR("CHIPOperationalCredentialsDelegate::init failed to set up CA keypair: %s", err.AsString()); - return err; - } - } else { - mIssuerKey = std::move(nocSigner); - } - - if (ipk) { - if ([ipk length] != mIPK.Length()) { - CHIP_LOG_ERROR("CHIPOperationalCredentialsDelegate::init provided IPK is wrong size"); - return CHIP_ERROR_INVALID_ARGUMENT; - } - memcpy(mIPK.Bytes(), [ipk bytes], [ipk length]); - } else { - CHIP_ERROR err = LoadIPKFromKeyChain(); - - if (err != CHIP_NO_ERROR) { - // Generate an IPK if an IPK could not be loaded. Delete the existing - // IPK first, in case we have already-stored data that could not be - // loaded as an IPK; otherwise IPK generation will fail due to not being - // able to store in the keychain. - DeleteIPKFromKeyChain(); - - err = GenerateIPK(); - } + mIssuerKey = std::move(nocSigner); - if (err != CHIP_NO_ERROR) { - CHIP_LOG_ERROR("CHIPOperationalCredentialsDelegate::init failed to set up IPK: %s", err.AsString()); - return err; - } - } - - // If keys were loaded, or generated, let's get the certificate issuer ID - - // TODO - enable generating a random issuer ID and saving it in persistent storage - // err = SetIssuerID(storage); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR CHIPOperationalCredentialsDelegate::SetIssuerID(CHIPPersistentStorageDelegateBridge * storage) -{ - static const char * const CHIP_COMMISSIONER_CA_ISSUER_ID = "com.zigbee.chip.commissioner.ca.issuer.id"; - if (storage == nil) { + if ([ipk length] != mIPK.Length()) { + CHIP_LOG_ERROR("CHIPOperationalCredentialsDelegate::init provided IPK is wrong size"); return CHIP_ERROR_INVALID_ARGUMENT; } - - uint16_t issuerIdLen = sizeof(mIssuerId); - if (CHIP_NO_ERROR != storage->SyncGetKeyValue(CHIP_COMMISSIONER_CA_ISSUER_ID, &mIssuerId, issuerIdLen)) { - mIssuerId = arc4random(); - mIssuerId = mIssuerId << 32 | arc4random(); - CHIP_LOG_ERROR("Assigned %llx certificate issuer ID to the commissioner", mIssuerId); - storage->SyncSetKeyValue(CHIP_COMMISSIONER_CA_ISSUER_ID, &mIssuerId, sizeof(mIssuerId)); - } else { - CHIP_LOG_ERROR("Found %llx certificate issuer ID for the commissioner", mIssuerId); - } - - return CHIP_NO_ERROR; -} - -CHIP_ERROR CHIPOperationalCredentialsDelegate::LoadRootCertKeysFromKeyChain() -{ - const NSDictionary * query = @{ - (id) kSecClass : (id) kSecClassGenericPassword, - (id) kSecAttrService : kCHIPCAKeyChainLabel, - (id) kSecAttrSynchronizable : @YES, - (id) kSecReturnData : @YES, - }; - - // The CFDataRef we get from SecItemCopyMatching allocates its - // buffer in a way that zeroes it when deallocated. - CFDataRef keyDataRef; - OSStatus status = SecItemCopyMatching((CFDictionaryRef) query, (CFTypeRef *) &keyDataRef); - if (status == errSecItemNotFound || keyDataRef == nil) { - CHIP_LOG_ERROR("Did not find self managed keys in the keychain"); - return CHIP_ERROR_KEY_NOT_FOUND; - } - - CHIP_LOG_ERROR("Found an existing self managed keypair in the keychain"); - NSData * keyData = CFBridgingRelease(keyDataRef); - - NSMutableData * keypairData = [[NSMutableData alloc] initWithBase64EncodedData:keyData options:0]; - - chip::Crypto::P256SerializedKeypair serialized; - if ([keypairData length] != serialized.Capacity()) { - NSLog(@"Keypair length %u does not match expected length %u", static_cast([keypairData length]), - static_cast(serialized.Capacity())); - ClearSecretData(keypairData); - return CHIP_ERROR_INTERNAL; - } - - std::memmove((uint8_t *) serialized, [keypairData bytes], [keypairData length]); - serialized.SetLength([keypairData length]); - - ClearSecretData(keypairData); - - CHIP_LOG_ERROR("Deserializing the key"); - return mIssuerKey->Deserialize(serialized); -} - -CHIP_ERROR CHIPOperationalCredentialsDelegate::LoadIPKFromKeyChain() -{ - const NSDictionary * query = @{ - (id) kSecClass : (id) kSecClassGenericPassword, - (id) kSecAttrService : kCHIPIPKKeyChainLabel, - (id) kSecAttrSynchronizable : @YES, - (id) kSecReturnData : @YES, - }; - - // The CFDataRef we get from SecItemCopyMatching allocates its - // buffer in a way that zeroes it when deallocated. - CFDataRef keyDataRef; - OSStatus status = SecItemCopyMatching((CFDictionaryRef) query, (CFTypeRef *) &keyDataRef); - if (status == errSecItemNotFound || keyDataRef == nil) { - CHIP_LOG_ERROR("Did not find IPK in the keychain"); - return CHIP_ERROR_KEY_NOT_FOUND; - } - - CHIP_LOG_ERROR("Found an existing IPK in the keychain"); - NSData * keyData = CFBridgingRelease(keyDataRef); - - NSMutableData * ipkData = [[NSMutableData alloc] initWithBase64EncodedData:keyData options:0]; - if ([ipkData length] != mIPK.Length()) { - NSLog(@"IPK length %u does not match expected length %u", static_cast([ipkData length]), - static_cast(mIPK.Length())); - ClearSecretData(ipkData); - return CHIP_ERROR_INTERNAL; - } - - memcpy(mIPK.Bytes(), [ipkData bytes], [ipkData length]); - ClearSecretData(ipkData); - return CHIP_NO_ERROR; -} - -CHIP_ERROR CHIPOperationalCredentialsDelegate::GenerateRootCertKeys() -{ - CHIP_LOG_ERROR("Generating self managed keys for the CA"); - CHIP_ERROR errorCode = mIssuerKey->Initialize(); - if (errorCode != CHIP_NO_ERROR) { - return errorCode; - } - - chip::Crypto::P256SerializedKeypair serializedKey; - errorCode = mIssuerKey->Serialize(serializedKey); - if (errorCode != CHIP_NO_ERROR) { - return errorCode; - } - - NSMutableData * keypairData = [NSMutableData dataWithBytes:serializedKey.Bytes() length:serializedKey.Length()]; - - const NSDictionary * addParams = @{ - (id) kSecClass : (id) kSecClassGenericPassword, - (id) kSecAttrService : kCHIPCAKeyChainLabel, - (id) kSecAttrSynchronizable : @YES, - // TODO: Figure out how to ClearSecretData on the base-64 encoded data? - (id) kSecValueData : [keypairData base64EncodedDataWithOptions:0], - }; - - ClearSecretData(keypairData); - - OSStatus status = SecItemAdd((__bridge CFDictionaryRef) addParams, nullptr); - // TODO: Enable SecItemAdd for Darwin unit tests - if (status != errSecSuccess && !isRunningTests()) { - NSLog(@"Failed in storing key : %d", status); - return CHIP_ERROR_INTERNAL; - } - - NSLog(@"Stored the keys"); - mForceRootCertRegeneration = true; - return CHIP_NO_ERROR; -} - -CHIP_ERROR CHIPOperationalCredentialsDelegate::GenerateIPK() -{ - CHIP_ERROR errorCode = DRBG_get_bytes(mIPK.Bytes(), mIPK.Length()); - if (errorCode != CHIP_NO_ERROR) { - return errorCode; - } - - NSMutableData * ipkData = [NSMutableData dataWithBytes:mIPK.Bytes() length:mIPK.Length()]; - - const NSDictionary * addParams = @{ - (id) kSecClass : (id) kSecClassGenericPassword, - (id) kSecAttrService : kCHIPIPKKeyChainLabel, - (id) kSecAttrSynchronizable : @YES, - // TODO: Figure out how to ClearSecretData on the base-64 encoded data? - (id) kSecValueData : [ipkData base64EncodedDataWithOptions:0], - }; - - ClearSecretData(ipkData); - - OSStatus status = SecItemAdd((__bridge CFDictionaryRef) addParams, nullptr); - // TODO: Enable SecItemAdd for Darwin unit tests - if (status != errSecSuccess && !isRunningTests()) { - NSLog(@"Failed in storing IPK : %d", status); - return CHIP_ERROR_INTERNAL; - } - - NSLog(@"Stored IPK"); - return CHIP_NO_ERROR; -} - -CHIP_ERROR CHIPOperationalCredentialsDelegate::DeleteRootCertKeysFromKeychain() -{ - CHIP_LOG_ERROR("Deleting self managed CA keys"); - OSStatus status = noErr; - - const NSDictionary * deleteParams = @{ - (id) kSecClass : (id) kSecClassGenericPassword, - (id) kSecAttrService : kCHIPCAKeyChainLabel, - (id) kSecAttrSynchronizable : @YES, - }; - - status = SecItemDelete((__bridge CFDictionaryRef) deleteParams); - if (status != errSecSuccess) { - NSLog(@"Failed in deleting key : %d", status); - return CHIP_ERROR_INTERNAL; - } - - NSLog(@"Deleted the key"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR CHIPOperationalCredentialsDelegate::DeleteIPKFromKeyChain() -{ - const NSDictionary * deleteParams = @{ - (id) kSecClass : (id) kSecClassGenericPassword, - (id) kSecAttrService : kCHIPIPKKeyChainLabel, - (id) kSecAttrSynchronizable : @YES, - }; - - OSStatus status = SecItemDelete((__bridge CFDictionaryRef) deleteParams); - if (status != errSecSuccess) { - NSLog(@"Failed in deleting IPK : %d", status); - return CHIP_ERROR_INTERNAL; - } - - NSLog(@"Deleted the IPK"); + memcpy(mIPK.Bytes(), [ipk bytes], [ipk length]); return CHIP_NO_ERROR; } @@ -338,19 +78,16 @@ static void ClearSecretData(NSMutableData * data) } ChipDN rcac_dn; - if (!mForceRootCertRegeneration) { - uint16_t rcacBufLen = static_cast(std::min(rcac.size(), static_cast(UINT16_MAX))); - PERSISTENT_KEY_OP(fabricId, kOperationalCredentialsRootCertificateStorage, key, - haveRootCert = (mStorage->SyncGetKeyValue(key, rcac.data(), rcacBufLen) == CHIP_NO_ERROR)); - if (haveRootCert) { - uint64_t rcacId; - rcac.reduce_size(rcacBufLen); - ReturnErrorOnFailure(ExtractSubjectDNFromX509Cert(rcac, rcac_dn)); - ReturnErrorOnFailure(rcac_dn.GetCertChipId(rcacId)); - VerifyOrReturnError(rcacId == mIssuerId, CHIP_ERROR_INTERNAL); - } - } - if (!haveRootCert) { + uint16_t rcacBufLen = static_cast(std::min(rcac.size(), static_cast(UINT16_MAX))); + PERSISTENT_KEY_OP(fabricId, kOperationalCredentialsRootCertificateStorage, key, + haveRootCert = (mStorage->SyncGetKeyValue(key, rcac.data(), rcacBufLen) == CHIP_NO_ERROR)); + if (haveRootCert) { + uint64_t rcacId; + rcac.reduce_size(rcacBufLen); + ReturnErrorOnFailure(ExtractSubjectDNFromX509Cert(rcac, rcac_dn)); + ReturnErrorOnFailure(rcac_dn.GetCertChipId(rcacId)); + VerifyOrReturnError(rcacId == mIssuerId, CHIP_ERROR_INTERNAL); + } else { ReturnErrorOnFailure(rcac_dn.AddAttribute_MatterRCACId(mIssuerId)); ReturnErrorOnFailure(rcac_dn.AddAttribute_MatterFabricId(fabricId)); @@ -361,8 +98,6 @@ static void ClearSecretData(NSMutableData * data) VerifyOrReturnError(CanCastTo(rcac.size()), CHIP_ERROR_INTERNAL); PERSISTENT_KEY_OP(fabricId, kOperationalCredentialsRootCertificateStorage, key, ReturnErrorOnFailure(mStorage->SyncSetKeyValue(key, rcac.data(), static_cast(rcac.size())))); - - mForceRootCertRegeneration = false; } icac.reduce_size(0); diff --git a/src/darwin/Framework/CHIP/MatterControllerFactory.h b/src/darwin/Framework/CHIP/MatterControllerFactory.h index 22337fea2303c5..a407b2f43d956d 100644 --- a/src/darwin/Framework/CHIP/MatterControllerFactory.h +++ b/src/darwin/Framework/CHIP/MatterControllerFactory.h @@ -68,24 +68,24 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic) uint16_t vendorId; /* - * Root CA keypair that identifies (via its public key) the fabric. Nullable - * for now, but that will change. + * Root CA keypair that scopes (via its public key) the fabric id. To use + * startControllerOnExistingFabric successfully, both the public key of + * rootCAKeypair and the fabricId must match an existing fabric. */ -@property (strong, nonatomic, nullable) id rootCAKeypair; +@property (strong, nonatomic) id rootCAKeypair; /* * Fabric id for the controller. Must be set to a nonzero value. */ @property (nonatomic) uint64_t fabricId; /* - * IPK to use for the controller's fabric. Allowed to be null when - * starting a controller on an existing fabric. + * IPK to use for the controller's fabric. Allowed to change from the last time + * a controller was started on this fabric if a new IPK has been distributed to + * all the devices the controller wants to interact with. */ -@property (strong, nonatomic, nullable) NSData * ipk; +@property (strong, nonatomic) NSData * ipk; - (instancetype)init NS_UNAVAILABLE; -// TODO The keypair should not be nullable, but we need to sort out -// CHIPClustersTests and CHIPTool use of these APIs first. -- (instancetype)initWithKeypair:(_Nullable id)rootCAKeypair; +- (instancetype)initWithKeypair:(id)rootCAKeypair ipk:(NSData *)ipk; @end diff --git a/src/darwin/Framework/CHIP/MatterControllerFactory.mm b/src/darwin/Framework/CHIP/MatterControllerFactory.mm index 780a1e3ba11596..1f8a51546f654e 100644 --- a/src/darwin/Framework/CHIP/MatterControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MatterControllerFactory.mm @@ -297,22 +297,6 @@ - (CHIPDeviceController * _Nullable)startControllerOnExistingFabric:(CHIPDeviceC okToStart = YES; }); - if (startupParams.rootCAKeypair == nil) { - // TODO: This block needs for nil keypair needs to go away. - // - // We don't have to a public key to identify this fabric, so - // okToStart got set to false, just assume that it's OK to start - // the controller. But only if we have no running controllers - // already, so we don't stomp on other controllers. - // - // Our controller is already in _controllers. - if ([_controllers count] == 1) { - okToStart = YES; - } else { - CHIP_LOG_ERROR("No root key, an a controller is already running. Blocking second controller"); - } - } - if (okToStart == NO) { [self controllerShuttingDown:controller]; return nil; @@ -334,14 +318,6 @@ - (CHIPDeviceController * _Nullable)startControllerOnNewFabric:(CHIPDeviceContro return nil; } - if (startupParams.rootCAKeypair == nil) { - // TODO: This block needs for nil keypair needs to go away. - // - // Disallow starting on a "new fabric" if there is no indication - // of what the new fabric should be. - return nil; - } - // Create the controller, so we start the event loop, since we plan to do our fabric table operations there. auto * controller = [self createController]; if (controller == nil) { diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index fc1e6420300802..f94c3422a567f1 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -125,10 +125,9 @@ - (void)testInitStack __auto_type * testKeys = [[CHIPTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys ipk:testKeys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; - params.ipk = testKeys.ipk; CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); diff --git a/src/darwin/Framework/CHIPTests/CHIPControllerTests.m b/src/darwin/Framework/CHIPTests/CHIPControllerTests.m index 2489ee9a9f327e..8ebc650fdc7b14 100644 --- a/src/darwin/Framework/CHIPTests/CHIPControllerTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPControllerTests.m @@ -69,10 +69,9 @@ - (void)testControllerLifecycle __auto_type * testKeys = [[CHIPTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys ipk:testKeys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; - params.ipk = testKeys.ipk; CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); @@ -106,10 +105,9 @@ - (void)testFactoryShutdownShutsDownController __auto_type * testKeys = [[CHIPTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys ipk:testKeys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; - params.ipk = testKeys.ipk; CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); @@ -133,10 +131,9 @@ - (void)testControllerMultipleShutdown __auto_type * testKeys = [[CHIPTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys ipk:testKeys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; - params.ipk = testKeys.ipk; CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertTrue([controller isRunning]); @@ -162,10 +159,9 @@ - (void)testControllerInvalidAccess __auto_type * testKeys = [[CHIPTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys ipk:testKeys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; - params.ipk = testKeys.ipk; CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertTrue([controller isRunning]); @@ -182,45 +178,6 @@ - (void)testControllerInvalidAccess XCTAssertFalse([factory isRunning]); } -- (void)testControllerStartTwoControllersNoKeypair -{ - __auto_type * factory = [MatterControllerFactory sharedInstance]; - XCTAssertNotNil(factory); - - __auto_type * storage = [[CHIPTestStorage alloc] init]; - __auto_type * factoryParams = [[MatterControllerFactoryParams alloc] initWithStorage:storage]; - XCTAssertTrue([factory startup:factoryParams]); - XCTAssertTrue([factory isRunning]); - - __auto_type * testKeys = [[CHIPTestKeys alloc] init]; - XCTAssertNotNil(testKeys); - - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; - params.vendorId = kTestVendorId; - params.fabricId = 1; - - // TODO: Once we require a non-nil keypair, this test will stop - // making sense and need to go away. - CHIPDeviceController * controller1 = [factory startControllerOnExistingFabric:params]; - XCTAssertNotNil(controller1); - XCTAssertTrue([controller1 isRunning]); - - // now try to start a second controller. - params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:nil]; - params.vendorId = kTestVendorId; - params.fabricId = 2; - CHIPDeviceController * controller2 = [factory startControllerOnExistingFabric:params]; - // Should fail, because we don't allow starting a second - // controller without a provided keypair. - XCTAssertNil(controller2); - - [controller1 shutdown]; - XCTAssertFalse([controller1 isRunning]); - - [factory shutdown]; - XCTAssertFalse([factory isRunning]); -} - - (void)testControllerNewFabricMatchesOldFabric { __auto_type * factory = [MatterControllerFactory sharedInstance]; @@ -234,10 +191,9 @@ - (void)testControllerNewFabricMatchesOldFabric __auto_type * testKeys = [[CHIPTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys ipk:testKeys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; - params.ipk = testKeys.ipk; CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); @@ -269,10 +225,9 @@ - (void)testControllerExistingFabricMatchesRunningController __auto_type * testKeys = [[CHIPTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys ipk:testKeys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; - params.ipk = testKeys.ipk; CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); @@ -303,10 +258,9 @@ - (void)testControllerStartControllersOnTwoFabricIds __auto_type * testKeys = [[CHIPTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys ipk:testKeys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; - params.ipk = testKeys.ipk; CHIPDeviceController * controller1 = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller1); diff --git a/src/darwin/Framework/CHIPTests/CHIPDeviceTests.m b/src/darwin/Framework/CHIPTests/CHIPDeviceTests.m index 8087e497b7555f..bf7fbc7ed8514c 100644 --- a/src/darwin/Framework/CHIPTests/CHIPDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPDeviceTests.m @@ -157,10 +157,9 @@ - (void)initStack __auto_type * testKeys = [[CHIPTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys ipk:testKeys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; - params.ipk = testKeys.ipk; CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); diff --git a/src/darwin/Framework/CHIPTests/CHIPXPCListenerSampleTests.m b/src/darwin/Framework/CHIPTests/CHIPXPCListenerSampleTests.m index 33c9c5fce65a2e..ed33ec69d0c852 100644 --- a/src/darwin/Framework/CHIPTests/CHIPXPCListenerSampleTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPXPCListenerSampleTests.m @@ -524,10 +524,9 @@ - (void)initStack __auto_type * testKeys = [[CHIPTestKeys alloc] init]; XCTAssertNotNil(testKeys); - __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys]; + __auto_type * params = [[CHIPDeviceControllerStartupParams alloc] initWithKeypair:testKeys ipk:testKeys.ipk]; params.vendorId = kTestVendorId; params.fabricId = 1; - params.ipk = testKeys.ipk; CHIPDeviceController * controller = [factory startControllerOnNewFabric:params]; XCTAssertNotNil(controller); From 3c3a422a0029d192cf2de2654d84364d2f1ef87b Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Mon, 9 May 2022 23:40:16 +0200 Subject: [PATCH 10/26] [chip-tool-darwin] Enable TestSystemCommands (#18225) * [chip-tool-darwin] Enable TestSystemCommands * Update generated test code --- .../chip-tool-darwin/templates/tests/tests.js | 4 - .../zap-generated/test/Commands.h | 433 ++++++++++++++++++ 2 files changed, 433 insertions(+), 4 deletions(-) diff --git a/examples/chip-tool-darwin/templates/tests/tests.js b/examples/chip-tool-darwin/templates/tests/tests.js index e21af7bcb0f248..3ad187356ffce2 100644 --- a/examples/chip-tool-darwin/templates/tests/tests.js +++ b/examples/chip-tool-darwin/templates/tests/tests.js @@ -45,10 +45,6 @@ function getTests() { // TODO: TestConfigVariables not supported properly in codegen yet. tests.disable('TestConfigVariables'); - // TODO: TestSystemCommands needs codegen changes or changes to the system - // command implementation. - tests.disable('TestSystemCommands'); - // TODO: TestGroupMessaging does not work on Darwin for now. tests.disable('TestGroupMessaging'); diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index 17c45e6cdb6a5d..72f8c905c6a138 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -205,6 +205,7 @@ class TestList : public Command { printf("TestOperationalCredentialsCluster\n"); printf("TestModeSelectCluster\n"); printf("TestSelfFabricRemoval\n"); + printf("TestSystemCommands\n"); printf("TestBinding\n"); printf("TestUserLabelCluster\n"); printf("TestArmFailSafe\n"); @@ -91246,6 +91247,437 @@ class TestSelfFabricRemoval : public TestCommandBridge { } }; +class TestSystemCommands : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestSystemCommands() + : TestCommandBridge("TestSystemCommands") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("payload", &mPayload); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~TestSystemCommands() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestSystemCommands\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestSystemCommands\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Stop the default accessory\n"); + err = TestStopTheDefaultAccessory_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Start the default accessory with no command line options\n"); + err = TestStartTheDefaultAccessoryWithNoCommandLineOptions_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Stop the default accessory by key\n"); + err = TestStopTheDefaultAccessoryByKey_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Start the default accessory with discriminator command line option\n"); + err = TestStartTheDefaultAccessoryWithDiscriminatorCommandLineOption_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Stop the default accessory\n"); + err = TestStopTheDefaultAccessory_5(); + break; + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : Start the default accessory with discriminator and port command line options\n"); + err = TestStartTheDefaultAccessoryWithDiscriminatorAndPortCommandLineOptions_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Stop the default accessory\n"); + err = TestStopTheDefaultAccessory_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Start the default accessory with minCommissioningTimeout only\n"); + err = TestStartTheDefaultAccessoryWithMinCommissioningTimeoutOnly_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Stop the default accessory\n"); + err = TestStopTheDefaultAccessory_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Start the default accessory by key with all command line options\n"); + err = TestStartTheDefaultAccessoryByKeyWithAllCommandLineOptions_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Start a second accessory with all command line options\n"); + err = TestStartASecondAccessoryWithAllCommandLineOptions_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Commission second accessory from alpha\n"); + err = TestCommissionSecondAccessoryFromAlpha_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait for the second commissioned device to be retrieved for alpha\n"); + err = TestWaitForTheSecondCommissionedDeviceToBeRetrievedForAlpha_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Stop the second accessory\n"); + err = TestStopTheSecondAccessory_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Start a second accessory with different KVS\n"); + err = TestStartASecondAccessoryWithDifferentKvs_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Reboot the default accessory\n"); + err = TestRebootTheDefaultAccessory_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reboot the default accessory by key\n"); + err = TestRebootTheDefaultAccessoryByKey_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Reboot the second accessory\n"); + err = TestRebootTheSecondAccessory_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Factory Reset the default accessory\n"); + err = TestFactoryResetTheDefaultAccessory_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Factory Reset the default accessory by key\n"); + err = TestFactoryResetTheDefaultAccessoryByKey_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Factory Reset the second accessory\n"); + err = TestFactoryResetTheSecondAccessory_21(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + WaitForMs(0); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 22; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mPayload; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStopTheDefaultAccessory_1() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + Stop("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStartTheDefaultAccessoryWithNoCommandLineOptions_2() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + Start("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStopTheDefaultAccessoryByKey_3() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + Stop("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStartTheDefaultAccessoryWithDiscriminatorCommandLineOption_4() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 1111U; + Start("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStopTheDefaultAccessory_5() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + Stop("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStartTheDefaultAccessoryWithDiscriminatorAndPortCommandLineOptions_6() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 1111U; + value.port.Emplace(); + value.port.Value() = 5560U; + Start("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStopTheDefaultAccessory_7() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + Stop("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStartTheDefaultAccessoryWithMinCommissioningTimeoutOnly_8() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.minCommissioningTimeout.Emplace(); + value.minCommissioningTimeout.Value() = 10U; + Start("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStopTheDefaultAccessory_9() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + Stop("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStartTheDefaultAccessoryByKeyWithAllCommandLineOptions_10() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 1111U; + value.port.Emplace(); + value.port.Value() = 5560U; + value.kvs.Emplace(); + value.kvs.Value() = chip::Span("/tmp/chip_kvs_defaultgarbage: not in length on purpose", 21); + value.minCommissioningTimeout.Emplace(); + value.minCommissioningTimeout.Value() = 10U; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + Start("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStartASecondAccessoryWithAllCommandLineOptions_11() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 50U; + value.port.Emplace(); + value.port.Value() = 5561U; + value.kvs.Emplace(); + value.kvs.Value() = chip::Span("/tmp/chip_kvs_lockgarbage: not in length on purpose", 18); + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); + Start("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCommissionSecondAccessoryFromAlpha_12() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithQRCode::Type value; + value.nodeId = 3735928559ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); + PairWithQRCode("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWaitForTheSecondCommissionedDeviceToBeRetrievedForAlpha_13() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = 3735928559ULL; + WaitForCommissionee("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStopTheSecondAccessory_14() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); + Stop("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStartASecondAccessoryWithDifferentKvs_15() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = 50U; + value.port.Emplace(); + value.port.Value() = 5561U; + value.kvs.Emplace(); + value.kvs.Value() = chip::Span("/tmp/chip_kvs_lock2garbage: not in length on purpose", 19); + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); + Start("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRebootTheDefaultAccessory_16() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + Reboot("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRebootTheDefaultAccessoryByKey_17() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + Reboot("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRebootTheSecondAccessory_18() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); + Reboot("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestFactoryResetTheDefaultAccessory_19() + { + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + FactoryReset("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestFactoryResetTheDefaultAccessoryByKey_20() + { + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + FactoryReset("alpha", value); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestFactoryResetTheSecondAccessory_21() + { + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-lock-appgarbage: not in length on purpose", 13); + FactoryReset("alpha", value); + return CHIP_NO_ERROR; + } +}; + class TestBinding : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -104314,6 +104746,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), From e8dbf5dd7e0c648d00efb30554e1b993887674bc Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Tue, 10 May 2022 11:31:03 +0800 Subject: [PATCH 11/26] [Ameba] NotifyUpdateApplied sent after rebooting into new OTA image (#18079) * [OTA] NotifyUpdateApplied to be sent after device first reboot into new image - Added IsFirstRun and ConfirmCurrentImage checks - Currently added delay of 15seconds in example_matter to give time for ameba to obtain ipv6 address - TODO: Need to move wlan fast connect into matter using DCT * Restyled by clang-format Co-authored-by: Restyled.io --- src/platform/Ameba/AmebaOTAImageProcessor.cpp | 47 +++++++++++++++---- src/platform/Ameba/AmebaOTAImageProcessor.h | 5 +- src/platform/Ameba/ConfigurationManagerImpl.h | 12 ++--- 3 files changed, 48 insertions(+), 16 deletions(-) diff --git a/src/platform/Ameba/AmebaOTAImageProcessor.cpp b/src/platform/Ameba/AmebaOTAImageProcessor.cpp index 1f4df295bf8c12..ef9e51b8a6eccf 100644 --- a/src/platform/Ameba/AmebaOTAImageProcessor.cpp +++ b/src/platform/Ameba/AmebaOTAImageProcessor.cpp @@ -79,6 +79,38 @@ CHIP_ERROR AmebaOTAImageProcessor::ProcessBlock(ByteSpan & block) return CHIP_NO_ERROR; } +bool AmebaOTAImageProcessor::IsFirstImageRun() +{ + OTARequestorInterface * requestor = chip::GetRequestorInstance(); + if (requestor == nullptr) + { + return false; + } + + return requestor->GetCurrentUpdateState() == OTARequestorInterface::OTAUpdateStateEnum::kApplying; +} + +CHIP_ERROR AmebaOTAImageProcessor::ConfirmCurrentImage() +{ + OTARequestorInterface * requestor = chip::GetRequestorInstance(); + if (requestor == nullptr) + { + return CHIP_ERROR_INTERNAL; + } + + uint32_t currentVersion; + uint32_t targetVersion = requestor->GetTargetVersion(); + ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSoftwareVersion(currentVersion)); + if (currentVersion != targetVersion) + { + ChipLogError(SoftwareUpdate, "Current software version = %" PRIu32 ", expected software version = %" PRIu32, currentVersion, + targetVersion); + return CHIP_ERROR_INCORRECT_STATE; + } + + return CHIP_NO_ERROR; +} + void AmebaOTAImageProcessor::HandlePrepareDownload(intptr_t context) { auto * imageProcessor = reinterpret_cast(context); @@ -371,15 +403,14 @@ void AmebaOTAImageProcessor::HandleApply(intptr_t context) return; } - OTARequestorInterface * requestor = chip::GetRequestorInstance(); - if (requestor != nullptr) - { - // TODO: Implement restarting into new image instead of changing the version - DeviceLayer::ConfigurationMgr().StoreSoftwareVersion(imageProcessor->mSoftwareVersion); - requestor->NotifyUpdateApplied(); - } + ChipLogProgress(SoftwareUpdate, "Rebooting in 2 seconds..."); - // Reboot + // Delay action time before calling HandleRestart + chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Milliseconds32(2 * 1000), HandleRestart, nullptr); +} + +void AmebaOTAImageProcessor::HandleRestart(chip::System::Layer * systemLayer, void * appState) +{ ota_platform_reset(); } diff --git a/src/platform/Ameba/AmebaOTAImageProcessor.h b/src/platform/Ameba/AmebaOTAImageProcessor.h index 38d22e4eb1b96a..3d05b203bcabb5 100644 --- a/src/platform/Ameba/AmebaOTAImageProcessor.h +++ b/src/platform/Ameba/AmebaOTAImageProcessor.h @@ -44,8 +44,8 @@ class AmebaOTAImageProcessor : public OTAImageProcessorInterface CHIP_ERROR Apply() override; CHIP_ERROR Abort() override; CHIP_ERROR ProcessBlock(ByteSpan & block) override; - bool IsFirstImageRun() override { return false; } - CHIP_ERROR ConfirmCurrentImage() override { return CHIP_NO_ERROR; } + bool IsFirstImageRun() override; + CHIP_ERROR ConfirmCurrentImage() override; void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; } private: @@ -55,6 +55,7 @@ class AmebaOTAImageProcessor : public OTAImageProcessorInterface static void HandleAbort(intptr_t context); static void HandleProcessBlock(intptr_t context); static void HandleApply(intptr_t context); + static void HandleRestart(chip::System::Layer * systemLayer, void * appState); CHIP_ERROR ProcessHeader(ByteSpan & block); diff --git a/src/platform/Ameba/ConfigurationManagerImpl.h b/src/platform/Ameba/ConfigurationManagerImpl.h index c7cd2e2513ec97..78555c6f07b126 100644 --- a/src/platform/Ameba/ConfigurationManagerImpl.h +++ b/src/platform/Ameba/ConfigurationManagerImpl.h @@ -39,6 +39,12 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp public: // This returns an instance of this class. static ConfigurationManagerImpl & GetDefaultInstance(); + CHIP_ERROR GetRebootCount(uint32_t & rebootCount) override; + CHIP_ERROR StoreRebootCount(uint32_t rebootCount) override; + CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override; + CHIP_ERROR StoreTotalOperationalHours(uint32_t totalOperationalHours) override; + CHIP_ERROR GetBootReason(uint32_t & bootReason) override; + CHIP_ERROR StoreBootReason(uint32_t bootReason) override; private: // ===== Members that implement the ConfigurationManager public interface. @@ -49,12 +55,6 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp 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; - CHIP_ERROR GetRebootCount(uint32_t & rebootCount) override; - CHIP_ERROR StoreRebootCount(uint32_t rebootCount) override; - CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override; - CHIP_ERROR StoreTotalOperationalHours(uint32_t totalOperationalHours) override; - CHIP_ERROR GetBootReason(uint32_t & bootReason) override; - CHIP_ERROR StoreBootReason(uint32_t bootReason) override; CHIP_ERROR GetUniqueId(char * buf, size_t bufSize) override; // NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>. From 9cc13b53bc466ae03e9ccb32f16f449d9257339b Mon Sep 17 00:00:00 2001 From: Martin Turon Date: Mon, 9 May 2022 20:40:36 -0700 Subject: [PATCH 12/26] [coverage] Add use_coverage flag to add --coverage to clang builds. (#17935) * [coverage] Add use_coverage flag to add --coverage to clang builds. * [coverage] Add -o option to run lcov in a prebuilt output directory. * [coverage] Fixes for review comments. * [coverage] Rephrase use_coverage comment. --- build/config/compiler/BUILD.gn | 12 +++++ build/config/compiler/compiler.gni | 3 ++ build/config/defaults.gni | 5 ++ scripts/build_coverage.sh | 79 ++++++++++++++++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100755 scripts/build_coverage.sh diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 325561a2e0a21b..35c51811418096 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -439,6 +439,18 @@ config("fuzzing_default") { } } +config("coverage") { + cflags = [ "--coverage" ] + ldflags = cflags +} + +config("coverage_default") { + configs = [] + if (use_coverage) { + configs += [ ":coverage" ] + } +} + declare_args() { # Enable Runtime Type Information (RTTI) enable_rtti = false diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index 6e9f0d30aadd5d..4d502a997bf2a1 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni @@ -47,4 +47,7 @@ declare_args() { # enable libfuzzer is_libfuzzer = false + + # Generate code coverage analysis artifacts when enabled. + use_coverage = false } diff --git a/build/config/defaults.gni b/build/config/defaults.gni index a36b6f8447279d..62e4257bcd8c8b 100644 --- a/build/config/defaults.gni +++ b/build/config/defaults.gni @@ -79,6 +79,10 @@ declare_args() { # Defaults fuzzing configs. default_configs_fuzzing = [ "${build_root}/config/compiler:fuzzing_default" ] + # Defaults coverage configs. + default_configs_coverage = + [ "${build_root}/config/compiler:coverage_default" ] + # Defaults target-specific configs. default_configs_target = [ "${build_root}/config/compiler:target_default" ] @@ -108,6 +112,7 @@ default_configs += default_configs_runtime default_configs += default_configs_aliasing default_configs += default_configs_sanitize default_configs += default_configs_fuzzing +default_configs += default_configs_coverage default_configs += default_configs_target default_configs += default_configs_dead_code default_configs += default_configs_extra diff --git a/scripts/build_coverage.sh b/scripts/build_coverage.sh new file mode 100755 index 00000000000000..9beca4a6304760 --- /dev/null +++ b/scripts/build_coverage.sh @@ -0,0 +1,79 @@ +#!/usr/bin/env bash + +# +# 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. +# + +set -e + +_normpath() { + python -c "import os.path; print(os.path.normpath('$@'))" +} + +CHIP_ROOT=$(_normpath "$(dirname "$0")/..") +OUTPUT_ROOT="$CHIP_ROOT/out/coverage" +COVERAGE_ROOT="$OUTPUT_ROOT/coverage" +skip_gn=false + +help() { + + echo "Usage: $file_name [ options ... ]" + + echo "General Options: + -h, --help Display this information. +Input Options: + -o, --output_root Set the build output directory. When set manually, performs only lcov stage + on provided build output. Assumes output_root has been built with 'use_coverage=true' + and that 'ninja check' was run. + " +} + +file_name=${0##*/} + +while (($#)); do + case $1 in + --help | -h) + help + exit 1 + ;; + --output_root | -o) + OUTPUT_ROOT=$2 + COVERAGE_ROOT="$OUTPUT_ROOT/coverage" + skip_gn=true + shift + ;; + -*) + help + echo "Unknown Option \"$1\"" + exit 1 + ;; + esac + shift +done + +# Ensure we have a compilation environment +source "$CHIP_ROOT/scripts/activate.sh" + +# Generates ninja files +if [ "$skip_gn" == false ]; then + gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args='use_coverage=true' + ninja -C "$OUTPUT_ROOT" check +fi + +mkdir -p "$COVERAGE_ROOT" +lcov --initial --capture --directory "$OUTPUT_ROOT/obj" --output-file "$COVERAGE_ROOT/lcov_base.info" +lcov --capture --directory "$OUTPUT_ROOT"/obj --output-file "$COVERAGE_ROOT/lcov_test.info" +lcov --add-tracefile "$COVERAGE_ROOT/lcov_base.info" --add-tracefile "$COVERAGE_ROOT/lcov_test.info" --output-file "$COVERAGE_ROOT/lcov_final.info" +genhtml "$COVERAGE_ROOT/lcov_final.info" --output-directory "$COVERAGE_ROOT/html" From c766af7f75523fc1d774bc3449d161c8335bf84d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 9 May 2022 23:41:18 -0400 Subject: [PATCH 13/26] Generate Darwin framework glue for all known data model things. (#18220) The Darwin codegen was only generating things for clusters/commands/attributes enabled in controller-clusters.zap. We should generate for everything instead. --- .../zap-templates/common/ClustersHelper.js | 152 +- .../zap-templates/templates/chip/helper.js | 6 +- .../CHIP/CHIPCallbackBridgeBase_internal.h | 1 - .../CHIPAttributeTLVValueDecoder-src.zapt | 2 +- .../templates/CHIPCallbackBridge-src.zapt | 7 +- .../CHIPCallbackBridge_internal.zapt | 18 +- .../CHIP/templates/CHIPClustersObjc-src.zapt | 4 +- .../CHIP/templates/CHIPClustersObjc.zapt | 4 +- .../templates/CHIPClustersObjc_internal.zapt | 2 +- .../CHIPEventTLVValueDecoder-src.zapt | 2 +- .../CHIPAttributeTLVValueDecoder.mm | 10336 ++- .../CHIP/zap-generated/CHIPCallbackBridge.mm | 2289 +- .../CHIPCallbackBridge_internal.h | 2162 +- .../CHIP/zap-generated/CHIPClustersObjc.h | 16230 ++-- .../CHIP/zap-generated/CHIPClustersObjc.mm | 71853 ++++++++++------ 15 files changed, 66661 insertions(+), 36407 deletions(-) diff --git a/src/app/zap-templates/common/ClustersHelper.js b/src/app/zap-templates/common/ClustersHelper.js index 6d456903da5245..9b12eb5491f9ae 100644 --- a/src/app/zap-templates/common/ClustersHelper.js +++ b/src/app/zap-templates/common/ClustersHelper.js @@ -112,6 +112,26 @@ async function loadEndpoints() return result; } +async function loadAllClusters(packageId) +{ + const { db, sessionId } = this.global; + + let allClusters = await zclQuery.selectAllClusters(db, packageId); + // To match what loadClusters does, sort by cluster name (not cluster code). + allClusters.sort((a, b) => { + if (a.name < b.name) { + return -1; + } + if (a.name == b.name) { + return 0; + } + return 1; + }); + let serverClusters = allClusters.map(cluster => ({...cluster, side : 'server', enabled : true })); + let clientClusters = allClusters.map(cluster => ({...cluster, side : 'client', enabled : true })); + return serverClusters.concat(clientClusters); +} + async function loadClusters() { const { db, sessionId } = this.global; @@ -147,17 +167,70 @@ function loadCommandArguments(command, packageId) }); } +async function loadAllCommands(packageId) +{ + const { db, sessionId } = this.global; + let cmds = await queryCommand.selectAllCommandsWithClusterInfo(db, [ packageId ]); + // For each command, include it twice: once as outgoing for its source, once + // as incoming for its destination. + let outgoing = cmds.map(cmd => ({...cmd, incoming : false, outgoing : true, clusterSide : cmd.source })); + let incoming = cmds.map( + cmd => ({...cmd, incoming : true, outgoing : false, clusterSide : (cmd.source == 'server' ? 'client' : 'server') })); + let commands = Promise.resolve(outgoing.concat(incoming)); + return loadCommandsCommon.call(this, packageId, commands); +} + function loadCommands(packageId) { const { db, sessionId } = this.global; - return queryEndpointType.selectEndpointTypeIds(db, sessionId) - .then(endpointTypes => queryEndpointType.selectClustersAndEndpointDetailsFromEndpointTypes(db, endpointTypes)) - .then(endpointTypesAndClusters => queryCommand.selectCommandDetailsFromAllEndpointTypesAndClusters( - db, endpointTypesAndClusters, true)) - .then(commands => Promise.all(commands.map(command => loadCommandResponse.call(this, command, packageId)))) + let cmds = queryEndpointType.selectEndpointTypeIds(db, sessionId) + .then(endpointTypes => queryEndpointType.selectClustersAndEndpointDetailsFromEndpointTypes(db, endpointTypes)) + .then(endpointTypesAndClusters => queryCommand.selectCommandDetailsFromAllEndpointTypesAndClusters( + db, endpointTypesAndClusters, true)); + + return loadCommandsCommon.call(this, packageId, cmds); +} + +// commandsPromise is a promise for an array of commands. +function loadCommandsCommon(packageId, commandsPromise) +{ + return commandsPromise.then(commands => Promise.all(commands.map(command => loadCommandResponse.call(this, command, packageId)))) .then(commands => Promise.all(commands.map(command => loadCommandArguments.call(this, command, packageId)))); } +async function loadAllAttributes(packageId) +{ + // The 'server' side is enforced here, because the list of attributes is used to generate client global + // commands to retrieve server side attributes. + const { db, sessionId } = this.global; + let attrs = await zclQuery.selectAllAttributesBySide(db, 'server', [ packageId ]); + const globalAttrs = attrs.filter(attr => attr.clusterRef == null); + // Exclude global attributes for now, since we will add them ourselves for + // all clusters. + attrs = attrs.filter(attr => attr.clusterRef != null); + // selectAllAttributesBySide sets clusterRef, not clusterId, so manually + // set the latter here. + attrs.forEach(attr => attr.clusterId = attr.clusterRef); + + const clusters = await zclQuery.selectAllClusters(db, packageId); + for (let cluster of clusters) { + for (let globalAttr of globalAttrs) { + attrs.push({...globalAttr, clusterId : cluster.id }); + } + } + // selectAllAttributesBySide includes optionality information, which we + // don't want here, because the types of the attributes are not in fact + // optionals for our purposes. + attrs.forEach(attr => delete attr.isOptional); + // Treat all attributes that could be reportable as reportable. + attrs.forEach(attr => { + if (attr.isReportable) { + attr.includedReportable = true; + } + }); + return attrs.sort((a, b) => a.code - b.code); +} + function loadAttributes(packageId) { // The 'server' side is enforced here, because the list of attributes is used to generate client global @@ -176,24 +249,37 @@ function loadAttributes(packageId) //.then(attributes => Promise.all(attributes.map(attribute => types.typeSizeAttribute(db, packageId, attribute)) } -function loadEvents(packageId) +async function loadAllEvents(packageId) +{ + const { db, sessionId } = this.global; + let clusters = await zclQuery.selectAllClusters(db, packageId); + return loadEventsCommon.call(this, packageId, clusters); +} + +async function loadEvents(packageId) +{ + const { db, sessionId } = this.global; + let clusters = await queryEndpointType.selectEndpointTypeIds(db, sessionId) + .then(endpointTypes => Promise.all( + endpointTypes.map(({ endpointTypeId }) => queryEndpoint.selectEndpointClusters(db, endpointTypeId)))) + .then(clusters => clusters.flat(3)); + return loadEventsCommon.call(this, packageId, clusters); +} + +// clusters is an array of clusters (not a promise). +function loadEventsCommon(packageId, clusters) { const { db, sessionId } = this.global; - return queryEvent.selectAllEvents(db, packageId) - .then(events => { return queryEndpointType.selectEndpointTypeIds(db, sessionId) - .then(endpointTypes => Promise.all( - endpointTypes.map(({ endpointTypeId }) => queryEndpoint.selectEndpointClusters(db, endpointTypeId)))) - .then(clusters => clusters.flat(3)) - .then(clusters => { - events.forEach(event => { - const cluster = clusters.find(cluster => cluster.code == event.clusterCode && cluster.side == 'client'); - if (cluster) { - event.clusterId = cluster.clusterId; - event.clusterName = cluster.name; - } - }); - return events.filter(event => clusters.find(cluster => cluster.code == event.clusterCode)); - }) }) + return queryEvent.selectAllEvents(db, packageId).then(events => { + events.forEach(event => { + const cluster = clusters.find(cluster => cluster.code == event.clusterCode); + if (cluster) { + event.clusterId = cluster.clusterId; + event.clusterName = cluster.name; + } + }); + return events.filter(event => clusters.find(cluster => cluster.code == event.clusterCode)); + }); } function loadGlobalAttributes(packageId) @@ -473,8 +559,8 @@ function enhancedAttributes(attributes, globalAttributes, types) attributes.forEach(attribute => { enhancedItem(attribute, types); attribute.isGlobalAttribute = globalAttributes.includes(attribute.code); - attribute.isWritableAttribute = attribute.isWritable === 1; - attribute.isReportableAttribute = attribute.includedReportable === 1; + attribute.isWritableAttribute = !!attribute.isWritable; + attribute.isReportableAttribute = !!attribute.includedReportable; attribute.chipCallback = asChipCallback(attribute); attribute.isComplex = attribute.isList || attribute.isStruct || attribute.isArray; }); @@ -602,7 +688,11 @@ Clusters._computeUsedStructureNames = async function(structs) { this._used_structure_names = new Set(this._cluster_structures.usedStructures.keys()) } -Clusters.init = async function(context) { +/** + * If includeAll is true, all events/commands/attributes will be included, not + * just the ones enabled in the ZAP configuration. + */ +Clusters.init = async function(context, includeAll) { if (this.ready.running) { return this.ready; @@ -621,11 +711,13 @@ Clusters.init = async function(context) { const promises = [ Promise.all(loadTypes), loadEndpoints.call(context), - loadClusters.call(context), - loadCommands.call(context, packageId), - loadAttributes.call(context, packageId), + // For now just always use loadClusters, because we have a bunch of things + // defined in our XML that are not actually part of Matter. + (includeAll ? loadClusters : loadClusters).call(context, packageId), + (includeAll ? loadAllCommands : loadCommands).call(context, packageId), + (includeAll ? loadAllAttributes : loadAttributes).call(context, packageId), loadGlobalAttributes.call(context, packageId), - loadEvents.call(context, packageId), + (includeAll ? loadAllEvents : loadEvents).call(context, packageId), ]; let [types, endpoints, clusters, commands, attributes, globalAttributes, events] = await Promise.all(promises); @@ -654,13 +746,13 @@ function asBlocks(promise, options) return promise.then(data => templateUtil.collectBlocks(data, options, this)) } -function ensureClusters(context) +function ensureClusters(context, includeAll = false) { // Kick off Clusters initialization. This is async, but that's fine: all the // getters on Clusters wait on that initialziation to complete. ensureState(context, "Don't have a context"); - Clusters.init(context); + Clusters.init(context, includeAll); return Clusters; } diff --git a/src/app/zap-templates/templates/chip/helper.js b/src/app/zap-templates/templates/chip/helper.js index 86753aacf861e4..99f1b63d1ba670 100644 --- a/src/app/zap-templates/templates/chip/helper.js +++ b/src/app/zap-templates/templates/chip/helper.js @@ -104,7 +104,7 @@ function getResponses(methodName) */ function chip_server_clusters(options) { - return asBlocks.call(this, ensureClusters(this).getServerClusters(), options); + return asBlocks.call(this, ensureClusters(this, options.hash.includeAll).getServerClusters(), options); } /** @@ -123,7 +123,7 @@ function chip_has_server_clusters(options) */ function chip_client_clusters(options) { - return asBlocks.call(this, ensureClusters(this).getClientClusters(), options); + return asBlocks.call(this, ensureClusters(this, options.hash.includeAll).getClientClusters(), options); } /** @@ -142,7 +142,7 @@ function chip_has_client_clusters(options) */ function chip_clusters(options) { - return asBlocks.call(this, ensureClusters(this).getClusters(), options); + return asBlocks.call(this, ensureClusters(this, options.hash.includeAll).getClusters(), options); } /** diff --git a/src/darwin/Framework/CHIP/CHIPCallbackBridgeBase_internal.h b/src/darwin/Framework/CHIP/CHIPCallbackBridgeBase_internal.h index 7d5a8520a3355a..1a9b49ea4f27c7 100644 --- a/src/darwin/Framework/CHIP/CHIPCallbackBridgeBase_internal.h +++ b/src/darwin/Framework/CHIP/CHIPCallbackBridgeBase_internal.h @@ -18,7 +18,6 @@ #import #import "CHIPError_Internal.h" -#import "zap-generated/CHIPClientCallbacks.h" #import "zap-generated/CHIPClustersObjc.h" #include diff --git a/src/darwin/Framework/CHIP/templates/CHIPAttributeTLVValueDecoder-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPAttributeTLVValueDecoder-src.zapt index 68bd006d9fe375..102be84e662142 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPAttributeTLVValueDecoder-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPAttributeTLVValueDecoder-src.zapt @@ -18,7 +18,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader { switch (aPath.mClusterId) { - {{#chip_client_clusters}} + {{#chip_client_clusters includeAll=true}} case Clusters::{{asUpperCamelCase name}}::Id: { using namespace Clusters::{{asUpperCamelCase name}}; switch (aPath.mAttributeId) diff --git a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt index 9cad8988ca0745..5bbb973730d956 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt @@ -1,6 +1,5 @@ {{> header}} -{{#if (chip_has_client_clusters)}} #import "CHIPCallbackBridge_internal.h" #import "CHIPStructsObjc.h" #import "CHIPCommandPayloadsObjc.h" @@ -38,7 +37,7 @@ {{#>CHIPCallbackBridge type="vendor_id" isNullable=false ns="chip"}}VendorIdAttributeCallback{{/CHIPCallbackBridge}} {{#>CHIPCallbackBridge type="vendor_id" isNullable=true ns="chip"}}NullableVendorIdAttributeCallback{{/CHIPCallbackBridge}} -{{#chip_client_clusters}} +{{#chip_client_clusters includeAll=true}} {{#chip_server_cluster_attributes}} {{#if isArray}} {{#>CHIPCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}ListAttributeCallback{{/CHIPCallbackBridge}} @@ -53,7 +52,7 @@ {{/chip_server_cluster_attributes}} {{/chip_client_clusters}} -{{#chip_client_clusters}} +{{#chip_client_clusters includeAll=true}} {{#chip_cluster_responses}} {{#>CHIPCallbackBridge partial-type="Command" }}{{asUpperCamelCase ../../name}}Cluster{{asUpperCamelCase ../name}}Callback{{/CHIPCallbackBridge}} {{/chip_cluster_responses}} @@ -65,5 +64,3 @@ {{#>CHIPCallbackBridge type=(asType label) isNullable=true ns=parent.name}}Nullable{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallback{{/CHIPCallbackBridge}} {{/zcl_enums}} {{/zcl_clusters}} - -{{/if}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt index 67f1b986f552a9..4399b9d12d88d9 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt @@ -1,10 +1,10 @@ {{> header}} -{{#if (chip_has_client_clusters)}} #import #import "CHIPCallbackBridgeBase_internal.h" #include +#include #include typedef void (*CommandSuccessCallback)(void *, const chip::app::DataModel::NullObjectType &); @@ -14,7 +14,7 @@ typedef void (*CHIPDefaultSuccessCallbackType)(void *); typedef void (*VendorIdAttributeCallback)(void *, chip::VendorId); typedef void (*NullableVendorIdAttributeCallback)(void *, const chip::app::DataModel::Nullable &); -{{#chip_client_clusters}} +{{#chip_client_clusters includeAll=true}} {{#chip_cluster_responses}} typedef void (*CHIP{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}CallbackType)(void *, const chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::DecodableType &); {{/chip_cluster_responses}} @@ -27,16 +27,18 @@ typedef void (*Nullable{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase {{/zcl_enums}} {{/zcl_clusters}} -{{#chip_client_clusters}} +{{#chip_client_clusters includeAll=true}} {{#chip_server_cluster_attributes}} -{{#unless isArray}} +{{#if isArray}} +typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback)(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} data); +{{else}} {{#if_is_struct type}} typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}StructAttributeCallback)(void *, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}}); {{/if_is_struct}} {{#if_is_bitmap type}} typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback)(void *, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}}); {{/if_is_bitmap}} -{{/unless}} +{{/if}} {{/chip_server_cluster_attributes}} {{/chip_client_clusters}} @@ -71,7 +73,7 @@ typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Attribut {{#>CHIPCallbackBridge header="1" type="vendor_id" isNullable=false ns="chip"}}VendorIdAttributeCallback{{/CHIPCallbackBridge}} {{#>CHIPCallbackBridge header="1" type="vendor_id" isNullable=true ns="chip"}}NullableVendorIdAttributeCallback{{/CHIPCallbackBridge}} -{{#chip_client_clusters}} +{{#chip_client_clusters includeAll=true}} {{#chip_server_cluster_attributes}} {{#if isArray}} {{#>CHIPCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}ListAttributeCallback{{/CHIPCallbackBridge}} @@ -86,7 +88,7 @@ typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Attribut {{/chip_server_cluster_attributes}} {{/chip_client_clusters}} -{{#chip_client_clusters}} +{{#chip_client_clusters includeAll=true}} {{#chip_cluster_responses}} {{#>CHIPCallbackBridge header="1" partial-type="Command" }}{{asUpperCamelCase ../../name}}Cluster{{asUpperCamelCase ../name}}Callback{{/CHIPCallbackBridge}} {{/chip_cluster_responses}} @@ -98,5 +100,3 @@ typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Attribut {{#>CHIPCallbackBridge header="1" type=(asType label) isNullable=true ns=parent.name}}Nullable{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}AttributeCallback{{/CHIPCallbackBridge}} {{/zcl_enums}} {{/zcl_clusters}} - -{{/if}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt index 6038f4a71f8094..e2410936f2cc55 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc-src.zapt @@ -1,6 +1,5 @@ {{> header}} -{{#if (chip_has_client_clusters)}} #import #import "CHIPAttributeCacheContainer_Internal.h" @@ -19,7 +18,7 @@ using chip::Callback::Callback; using chip::Callback::Cancelable; using namespace chip::app::Clusters; // NOLINTBEGIN(clang-analyzer-cplusplus.NewDeleteLeaks): Linter is unable to locate the delete on these objects. -{{#chip_client_clusters}} +{{#chip_client_clusters includeAll=true}} @implementation CHIP{{asUpperCamelCase name}} - (chip::Controller::ClusterBase *)getCluster @@ -206,4 +205,3 @@ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEs {{/chip_client_clusters}} // NOLINTEND(clang-analyzer-cplusplus.NewDeleteLeaks) -{{/if}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt index aff80e44e25bfd..4923c251c16112 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt @@ -1,6 +1,5 @@ {{> header}} -{{#if (chip_has_client_clusters)}} #ifndef CHIP_CLUSTERS_H #define CHIP_CLUSTERS_H @@ -17,7 +16,7 @@ typedef void (^SubscriptionEstablishedHandler)(void); NS_ASSUME_NONNULL_BEGIN -{{#chip_client_clusters}} +{{#chip_client_clusters includeAll=true}} /** @@ -84,4 +83,3 @@ typedef NS_OPTIONS({{asUnderlyingZclType type}}, {{objCEnumName ../name label}}) NS_ASSUME_NONNULL_END #endif /* CHIP_CLUSTERS_H */ -{{/if}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc_internal.zapt b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc_internal.zapt index 910b5395ec42b1..b1a56f47370687 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc_internal.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc_internal.zapt @@ -4,7 +4,7 @@ #import "CHIPDevice.h" -{{#chip_client_clusters}} +{{#chip_client_clusters includeAll=true}} @interface CHIP{{asUpperCamelCase name}} () @property (readonly) chip::Controller::{{asUpperCamelCase name}}Cluster cppCluster; diff --git a/src/darwin/Framework/CHIP/templates/CHIPEventTLVValueDecoder-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPEventTLVValueDecoder-src.zapt index b3676bf41e9167..a93042336ac313 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPEventTLVValueDecoder-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPEventTLVValueDecoder-src.zapt @@ -21,7 +21,7 @@ id CHIPDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRea { switch (aPath.mClusterId) { - {{#chip_client_clusters}} + {{#chip_client_clusters includeAll=true}} case Clusters::{{asUpperCamelCase name}}::Id: { using namespace Clusters::{{asUpperCamelCase name}}; switch (aPath.mEventId) diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 7bf344fe7cfeb9..c198804cd3fdf8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -260,6 +260,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -358,6 +369,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -489,6 +511,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -694,6 +727,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -843,6 +887,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -983,6 +1038,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1036,6 +1102,72 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } + case Attributes::BarrierOpenEvents::Id: { + using TypeInfo = Attributes::BarrierOpenEvents::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::BarrierCloseEvents::Id: { + using TypeInfo = Attributes::BarrierCloseEvents::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::BarrierCommandOpenEvents::Id: { + using TypeInfo = Attributes::BarrierCommandOpenEvents::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::BarrierCommandCloseEvents::Id: { + using TypeInfo = Attributes::BarrierCommandCloseEvents::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::BarrierOpenPeriod::Id: { + using TypeInfo = Attributes::BarrierOpenPeriod::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::BarrierClosePeriod::Id: { + using TypeInfo = Attributes::BarrierClosePeriod::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } case Attributes::BarrierPosition::Id: { using TypeInfo = Attributes::BarrierPosition::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1125,6 +1257,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1445,6 +1588,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1465,6 +1619,39 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader case Clusters::BinaryInputBasic::Id: { using namespace Clusters::BinaryInputBasic; switch (aPath.mAttributeId) { + case Attributes::ActiveText::Id: { + using TypeInfo = Attributes::ActiveText::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::InactiveText::Id: { + using TypeInfo = Attributes::InactiveText::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } case Attributes::OutOfService::Id: { using TypeInfo = Attributes::OutOfService::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1476,6 +1663,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithBool:cppValue]; return value; } + case Attributes::Polarity::Id: { + using TypeInfo = Attributes::Polarity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } case Attributes::PresentValue::Id: { using TypeInfo = Attributes::PresentValue::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1487,6 +1685,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithBool:cppValue]; return value; } + case Attributes::Reliability::Id: { + using TypeInfo = Attributes::Reliability::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } case Attributes::StatusFlags::Id: { using TypeInfo = Attributes::StatusFlags::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1498,6 +1707,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } + case Attributes::ApplicationType::Id: { + using TypeInfo = Attributes::ApplicationType::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1576,6 +1796,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1721,6 +1952,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1830,6 +2072,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2020,6 +2273,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2283,6 +2547,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2501,9 +2776,20 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; @@ -3171,6 +3457,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3308,6 +3605,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3512,6 +3820,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3610,6 +3929,28 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; break; @@ -3671,6 +4012,50 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::DoorOpenEvents::Id: { + using TypeInfo = Attributes::DoorOpenEvents::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::DoorClosedEvents::Id: { + using TypeInfo = Attributes::DoorClosedEvents::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::OpenPeriod::Id: { + using TypeInfo = Attributes::OpenPeriod::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::NumberOfLogRecordsSupported::Id: { + using TypeInfo = Attributes::NumberOfLogRecordsSupported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } case Attributes::NumberOfTotalUsersSupported::Id: { using TypeInfo = Attributes::NumberOfTotalUsersSupported::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3781,6 +4166,28 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } + case Attributes::CredentialRulesSupport::Id: { + using TypeInfo = Attributes::CredentialRulesSupport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::EnableLogging::Id: { + using TypeInfo = Attributes::EnableLogging::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } case Attributes::Language::Id: { using TypeInfo = Attributes::Language::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3792,6 +4199,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; return value; } + case Attributes::LEDSettings::Id: { + using TypeInfo = Attributes::LEDSettings::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } case Attributes::AutoRelockTime::Id: { using TypeInfo = Attributes::AutoRelockTime::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3836,19 +4254,19 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::EnableOneTouchLocking::Id: { - using TypeInfo = Attributes::EnableOneTouchLocking::TypeInfo; + case Attributes::DefaultConfigurationRegister::Id: { + using TypeInfo = Attributes::DefaultConfigurationRegister::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::EnablePrivacyModeButton::Id: { - using TypeInfo = Attributes::EnablePrivacyModeButton::TypeInfo; + case Attributes::EnableLocalProgramming::Id: { + using TypeInfo = Attributes::EnableLocalProgramming::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -3858,30 +4276,30 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::WrongCodeEntryLimit::Id: { - using TypeInfo = Attributes::WrongCodeEntryLimit::TypeInfo; + case Attributes::EnableOneTouchLocking::Id: { + using TypeInfo = Attributes::EnableOneTouchLocking::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::UserCodeTemporaryDisableTime::Id: { - using TypeInfo = Attributes::UserCodeTemporaryDisableTime::TypeInfo; + case Attributes::EnableInsideStatusLED::Id: { + using TypeInfo = Attributes::EnableInsideStatusLED::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::RequirePINforRemoteOperation::Id: { - using TypeInfo = Attributes::RequirePINforRemoteOperation::TypeInfo; + case Attributes::EnablePrivacyModeButton::Id: { + using TypeInfo = Attributes::EnablePrivacyModeButton::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -3891,223 +4309,158 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::LocalProgrammingFeatures::Id: { + using TypeInfo = Attributes::LocalProgrammingFeatures::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::WrongCodeEntryLimit::Id: { + using TypeInfo = Attributes::WrongCodeEntryLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::UserCodeTemporaryDisableTime::Id: { + using TypeInfo = Attributes::UserCodeTemporaryDisableTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::SendPINOverTheAir::Id: { + using TypeInfo = Attributes::SendPINOverTheAir::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::ElectricalMeasurement::Id: { - using namespace Clusters::ElectricalMeasurement; - switch (aPath.mAttributeId) { - case Attributes::MeasurementType::Id: { - using TypeInfo = Attributes::MeasurementType::TypeInfo; + case Attributes::RequirePINforRemoteOperation::Id: { + using TypeInfo = Attributes::RequirePINforRemoteOperation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::TotalActivePower::Id: { - using TypeInfo = Attributes::TotalActivePower::TypeInfo; + case Attributes::ExpiringUserTimeout::Id: { + using TypeInfo = Attributes::ExpiringUserTimeout::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::RmsVoltage::Id: { - using TypeInfo = Attributes::RmsVoltage::TypeInfo; + case Attributes::AlarmMask::Id: { + using TypeInfo = Attributes::AlarmMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::RmsVoltageMin::Id: { - using TypeInfo = Attributes::RmsVoltageMin::TypeInfo; + case Attributes::KeypadOperationEventMask::Id: { + using TypeInfo = Attributes::KeypadOperationEventMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::RmsVoltageMax::Id: { - using TypeInfo = Attributes::RmsVoltageMax::TypeInfo; + case Attributes::RemoteOperationEventMask::Id: { + using TypeInfo = Attributes::RemoteOperationEventMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::RmsCurrent::Id: { - using TypeInfo = Attributes::RmsCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsCurrentMin::Id: { - using TypeInfo = Attributes::RmsCurrentMin::TypeInfo; + case Attributes::ManualOperationEventMask::Id: { + using TypeInfo = Attributes::ManualOperationEventMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::RmsCurrentMax::Id: { - using TypeInfo = Attributes::RmsCurrentMax::TypeInfo; + case Attributes::RFIDOperationEventMask::Id: { + using TypeInfo = Attributes::RFIDOperationEventMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::ActivePower::Id: { - using TypeInfo = Attributes::ActivePower::TypeInfo; + case Attributes::KeypadProgrammingEventMask::Id: { + using TypeInfo = Attributes::KeypadProgrammingEventMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::ActivePowerMin::Id: { - using TypeInfo = Attributes::ActivePowerMin::TypeInfo; + case Attributes::RemoteProgrammingEventMask::Id: { + using TypeInfo = Attributes::RemoteProgrammingEventMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::ActivePowerMax::Id: { - using TypeInfo = Attributes::ActivePowerMax::TypeInfo; + case Attributes::RFIDProgrammingEventMask::Id: { + using TypeInfo = Attributes::RFIDProgrammingEventMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -4188,6 +4541,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -4205,211 +4569,154 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::EthernetNetworkDiagnostics::Id: { - using namespace Clusters::EthernetNetworkDiagnostics; + case Clusters::ElectricalMeasurement::Id: { + using namespace Clusters::ElectricalMeasurement; switch (aPath.mAttributeId) { - case Attributes::PHYRate::Id: { - using TypeInfo = Attributes::PHYRate::TypeInfo; + case Attributes::MeasurementType::Id: { + using TypeInfo = Attributes::MeasurementType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::FullDuplex::Id: { - using TypeInfo = Attributes::FullDuplex::TypeInfo; + case Attributes::DcVoltage::Id: { + using TypeInfo = Attributes::DcVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithBool:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::PacketRxCount::Id: { - using TypeInfo = Attributes::PacketRxCount::TypeInfo; + case Attributes::DcVoltageMin::Id: { + using TypeInfo = Attributes::DcVoltageMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::PacketTxCount::Id: { - using TypeInfo = Attributes::PacketTxCount::TypeInfo; + case Attributes::DcVoltageMax::Id: { + using TypeInfo = Attributes::DcVoltageMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::TxErrCount::Id: { - using TypeInfo = Attributes::TxErrCount::TypeInfo; + case Attributes::DcCurrent::Id: { + using TypeInfo = Attributes::DcCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::CollisionCount::Id: { - using TypeInfo = Attributes::CollisionCount::TypeInfo; + case Attributes::DcCurrentMin::Id: { + using TypeInfo = Attributes::DcCurrentMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::OverrunCount::Id: { - using TypeInfo = Attributes::OverrunCount::TypeInfo; + case Attributes::DcCurrentMax::Id: { + using TypeInfo = Attributes::DcCurrentMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::CarrierDetect::Id: { - using TypeInfo = Attributes::CarrierDetect::TypeInfo; + case Attributes::DcPower::Id: { + using TypeInfo = Attributes::DcPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithBool:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::TimeSinceReset::Id: { - using TypeInfo = Attributes::TimeSinceReset::TypeInfo; + case Attributes::DcPowerMin::Id: { + using TypeInfo = Attributes::DcPowerMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::DcPowerMax::Id: { + using TypeInfo = Attributes::DcPowerMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::DcVoltageMultiplier::Id: { + using TypeInfo = Attributes::DcVoltageMultiplier::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::DcVoltageDivisor::Id: { + using TypeInfo = Attributes::DcVoltageDivisor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::DcCurrentMultiplier::Id: { + using TypeInfo = Attributes::DcCurrentMultiplier::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::DcCurrentDivisor::Id: { + using TypeInfo = Attributes::DcCurrentDivisor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -4419,357 +4726,239 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::FanControl::Id: { - using namespace Clusters::FanControl; - switch (aPath.mAttributeId) { - case Attributes::FanMode::Id: { - using TypeInfo = Attributes::FanMode::TypeInfo; + case Attributes::DcPowerMultiplier::Id: { + using TypeInfo = Attributes::DcPowerMultiplier::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::FanModeSequence::Id: { - using TypeInfo = Attributes::FanModeSequence::TypeInfo; + case Attributes::DcPowerDivisor::Id: { + using TypeInfo = Attributes::DcPowerDivisor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::PercentSetting::Id: { - using TypeInfo = Attributes::PercentSetting::TypeInfo; + case Attributes::AcFrequency::Id: { + using TypeInfo = Attributes::AcFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::PercentCurrent::Id: { - using TypeInfo = Attributes::PercentCurrent::TypeInfo; + case Attributes::AcFrequencyMin::Id: { + using TypeInfo = Attributes::AcFrequencyMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::SpeedMax::Id: { - using TypeInfo = Attributes::SpeedMax::TypeInfo; + case Attributes::AcFrequencyMax::Id: { + using TypeInfo = Attributes::AcFrequencyMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::SpeedSetting::Id: { - using TypeInfo = Attributes::SpeedSetting::TypeInfo; + case Attributes::NeutralCurrent::Id: { + using TypeInfo = Attributes::NeutralCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::SpeedCurrent::Id: { - using TypeInfo = Attributes::SpeedCurrent::TypeInfo; + case Attributes::TotalActivePower::Id: { + using TypeInfo = Attributes::TotalActivePower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithInt:cppValue]; return value; } - case Attributes::RockSupport::Id: { - using TypeInfo = Attributes::RockSupport::TypeInfo; + case Attributes::TotalReactivePower::Id: { + using TypeInfo = Attributes::TotalReactivePower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithInt:cppValue]; return value; } - case Attributes::RockSetting::Id: { - using TypeInfo = Attributes::RockSetting::TypeInfo; + case Attributes::TotalApparentPower::Id: { + using TypeInfo = Attributes::TotalApparentPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::WindSupport::Id: { - using TypeInfo = Attributes::WindSupport::TypeInfo; + case Attributes::Measured1stHarmonicCurrent::Id: { + using TypeInfo = Attributes::Measured1stHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::WindSetting::Id: { - using TypeInfo = Attributes::WindSetting::TypeInfo; + case Attributes::Measured3rdHarmonicCurrent::Id: { + using TypeInfo = Attributes::Measured3rdHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::Measured5thHarmonicCurrent::Id: { + using TypeInfo = Attributes::Measured5thHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; + return value; + } + case Attributes::Measured7thHarmonicCurrent::Id: { + using TypeInfo = Attributes::Measured7thHarmonicCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::Measured9thHarmonicCurrent::Id: { + using TypeInfo = Attributes::Measured9thHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::Measured11thHarmonicCurrent::Id: { + using TypeInfo = Attributes::Measured11thHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::MeasuredPhase1stHarmonicCurrent::Id: { + using TypeInfo = Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::MeasuredPhase3rdHarmonicCurrent::Id: { + using TypeInfo = Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::FixedLabel::Id: { - using namespace Clusters::FixedLabel; - switch (aPath.mAttributeId) { - case Attributes::LabelList::Id: { - using TypeInfo = Attributes::LabelList::TypeInfo; + case Attributes::MeasuredPhase5thHarmonicCurrent::Id: { + using TypeInfo = Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPFixedLabelClusterLabelStruct * newElement_0; - newElement_0 = [CHIPFixedLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::MeasuredPhase7thHarmonicCurrent::Id: { + using TypeInfo = Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::MeasuredPhase9thHarmonicCurrent::Id: { + using TypeInfo = Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::MeasuredPhase11thHarmonicCurrent::Id: { + using TypeInfo = Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::AcFrequencyMultiplier::Id: { + using TypeInfo = Attributes::AcFrequencyMultiplier::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -4779,62 +4968,74 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::FlowMeasurement::Id: { - using namespace Clusters::FlowMeasurement; - switch (aPath.mAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::AcFrequencyDivisor::Id: { + using TypeInfo = Attributes::AcFrequencyDivisor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::PowerMultiplier::Id: { + using TypeInfo = Attributes::PowerMultiplier::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::PowerDivisor::Id: { + using TypeInfo = Attributes::PowerDivisor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::HarmonicCurrentMultiplier::Id: { + using TypeInfo = Attributes::HarmonicCurrentMultiplier::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::PhaseHarmonicCurrentMultiplier::Id: { + using TypeInfo = Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; + return value; + } + case Attributes::InstantaneousVoltage::Id: { + using TypeInfo = Attributes::InstantaneousVoltage::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; + case Attributes::InstantaneousLineCurrent::Id: { + using TypeInfo = Attributes::InstantaneousLineCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -4844,86 +5045,41 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::InstantaneousActiveCurrent::Id: { + using TypeInfo = Attributes::InstantaneousActiveCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::InstantaneousReactiveCurrent::Id: { + using TypeInfo = Attributes::InstantaneousReactiveCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::InstantaneousPower::Id: { + using TypeInfo = Attributes::InstantaneousPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::RmsVoltage::Id: { + using TypeInfo = Attributes::RmsVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -4933,151 +5089,107 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::GeneralCommissioning::Id: { - using namespace Clusters::GeneralCommissioning; - switch (aPath.mAttributeId) { - case Attributes::Breadcrumb::Id: { - using TypeInfo = Attributes::Breadcrumb::TypeInfo; + case Attributes::RmsVoltageMin::Id: { + using TypeInfo = Attributes::RmsVoltageMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::BasicCommissioningInfo::Id: { - using TypeInfo = Attributes::BasicCommissioningInfo::TypeInfo; + case Attributes::RmsVoltageMax::Id: { + using TypeInfo = Attributes::RmsVoltageMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nonnull value; - value = [CHIPGeneralCommissioningClusterBasicCommissioningInfo new]; - value.failSafeExpiryLengthSeconds = [NSNumber numberWithUnsignedShort:cppValue.failSafeExpiryLengthSeconds]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::RegulatoryConfig::Id: { - using TypeInfo = Attributes::RegulatoryConfig::TypeInfo; + case Attributes::RmsCurrent::Id: { + using TypeInfo = Attributes::RmsCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::LocationCapability::Id: { - using TypeInfo = Attributes::LocationCapability::TypeInfo; + case Attributes::RmsCurrentMin::Id: { + using TypeInfo = Attributes::RmsCurrentMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::SupportsConcurrentConnection::Id: { - using TypeInfo = Attributes::SupportsConcurrentConnection::TypeInfo; + case Attributes::RmsCurrentMax::Id: { + using TypeInfo = Attributes::RmsCurrentMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ActivePower::Id: { + using TypeInfo = Attributes::ActivePower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ActivePowerMin::Id: { + using TypeInfo = Attributes::ActivePowerMin::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::ActivePowerMax::Id: { + using TypeInfo = Attributes::ActivePowerMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; + return value; + } + case Attributes::ReactivePower::Id: { + using TypeInfo = Attributes::ReactivePower::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::ApparentPower::Id: { + using TypeInfo = Attributes::ApparentPower::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -5087,94 +5199,41 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; + case Attributes::PowerFactor::Id: { + using TypeInfo = Attributes::PowerFactor::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; + return value; } - break; - } - case Clusters::GeneralDiagnostics::Id: { - using namespace Clusters::GeneralDiagnostics; - switch (aPath.mAttributeId) { - case Attributes::NetworkInterfaces::Id: { - using TypeInfo = Attributes::NetworkInterfaces::TypeInfo; + case Attributes::AverageRmsVoltageMeasurementPeriod::Id: { + using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPGeneralDiagnosticsClusterNetworkInterfaceType * newElement_0; - newElement_0 = [CHIPGeneralDiagnosticsClusterNetworkInterfaceType new]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.isOperational = [NSNumber numberWithBool:entry_0.isOperational]; - if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { - newElement_0.offPremiseServicesReachableIPv4 = nil; - } else { - newElement_0.offPremiseServicesReachableIPv4 = - [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4.Value()]; - } - if (entry_0.offPremiseServicesReachableIPv6.IsNull()) { - newElement_0.offPremiseServicesReachableIPv6 = nil; - } else { - newElement_0.offPremiseServicesReachableIPv6 = - [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6.Value()]; - } - newElement_0.hardwareAddress = [NSData dataWithBytes:entry_0.hardwareAddress.data() - length:entry_0.hardwareAddress.size()]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.IPv4Addresses.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.iPv4Addresses = array_2; - } - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.IPv6Addresses.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.iPv6Addresses = array_2; - } - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::AverageRmsUnderVoltageCounter::Id: { + using TypeInfo = Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::RebootCount::Id: { - using TypeInfo = Attributes::RebootCount::TypeInfo; + case Attributes::RmsExtremeOverVoltagePeriod::Id: { + using TypeInfo = Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -5184,297 +5243,140 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::UpTime::Id: { - using TypeInfo = Attributes::UpTime::TypeInfo; + case Attributes::RmsExtremeUnderVoltagePeriod::Id: { + using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::TotalOperationalHours::Id: { - using TypeInfo = Attributes::TotalOperationalHours::TypeInfo; + case Attributes::RmsVoltageSagPeriod::Id: { + using TypeInfo = Attributes::RmsVoltageSagPeriod::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::BootReasons::Id: { - using TypeInfo = Attributes::BootReasons::TypeInfo; + case Attributes::RmsVoltageSwellPeriod::Id: { + using TypeInfo = Attributes::RmsVoltageSwellPeriod::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ActiveHardwareFaults::Id: { - using TypeInfo = Attributes::ActiveHardwareFaults::TypeInfo; + case Attributes::AcVoltageMultiplier::Id: { + using TypeInfo = Attributes::AcVoltageMultiplier::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ActiveRadioFaults::Id: { - using TypeInfo = Attributes::ActiveRadioFaults::TypeInfo; + case Attributes::AcVoltageDivisor::Id: { + using TypeInfo = Attributes::AcVoltageDivisor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ActiveNetworkFaults::Id: { - using TypeInfo = Attributes::ActiveNetworkFaults::TypeInfo; + case Attributes::AcCurrentMultiplier::Id: { + using TypeInfo = Attributes::AcCurrentMultiplier::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::AcCurrentDivisor::Id: { + using TypeInfo = Attributes::AcCurrentDivisor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::AcPowerMultiplier::Id: { + using TypeInfo = Attributes::AcPowerMultiplier::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::AcPowerDivisor::Id: { + using TypeInfo = Attributes::AcPowerDivisor::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::OverloadAlarmsMask::Id: { + using TypeInfo = Attributes::OverloadAlarmsMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::GroupKeyManagement::Id: { - using namespace Clusters::GroupKeyManagement; - switch (aPath.mAttributeId) { - case Attributes::GroupKeyMap::Id: { - using TypeInfo = Attributes::GroupKeyMap::TypeInfo; + case Attributes::VoltageOverload::Id: { + using TypeInfo = Attributes::VoltageOverload::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; - newElement_0 = [CHIPGroupKeyManagementClusterGroupKeyMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GroupTable::Id: { - using TypeInfo = Attributes::GroupTable::TypeInfo; + case Attributes::CurrentOverload::Id: { + using TypeInfo = Attributes::CurrentOverload::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; - newElement_0 = [CHIPGroupKeyManagementClusterGroupInfoMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.endpoints.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.endpoints = array_2; - } - if (entry_0.groupName.HasValue()) { - newElement_0.groupName = [[NSString alloc] initWithBytes:entry_0.groupName.Value().data() - length:entry_0.groupName.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - newElement_0.groupName = nil; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::MaxGroupsPerFabric::Id: { - using TypeInfo = Attributes::MaxGroupsPerFabric::TypeInfo; + case Attributes::AcOverloadAlarmsMask::Id: { + using TypeInfo = Attributes::AcOverloadAlarmsMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -5484,226 +5386,118 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MaxGroupKeysPerFabric::Id: { - using TypeInfo = Attributes::MaxGroupKeysPerFabric::TypeInfo; + case Attributes::AcVoltageOverload::Id: { + using TypeInfo = Attributes::AcVoltageOverload::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::AcCurrentOverload::Id: { + using TypeInfo = Attributes::AcCurrentOverload::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::AcActivePowerOverload::Id: { + using TypeInfo = Attributes::AcActivePowerOverload::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::AcReactivePowerOverload::Id: { + using TypeInfo = Attributes::AcReactivePowerOverload::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::AverageRmsOverVoltage::Id: { + using TypeInfo = Attributes::AverageRmsOverVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::Groups::Id: { - using namespace Clusters::Groups; - switch (aPath.mAttributeId) { - case Attributes::NameSupport::Id: { - using TypeInfo = Attributes::NameSupport::TypeInfo; + case Attributes::AverageRmsUnderVoltage::Id: { + using TypeInfo = Attributes::AverageRmsUnderVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::RmsExtremeOverVoltage::Id: { + using TypeInfo = Attributes::RmsExtremeOverVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::RmsExtremeUnderVoltage::Id: { + using TypeInfo = Attributes::RmsExtremeUnderVoltage::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::RmsVoltageSag::Id: { + using TypeInfo = Attributes::RmsVoltageSag::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::RmsVoltageSwell::Id: { + using TypeInfo = Attributes::RmsVoltageSwell::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::Identify::Id: { - using namespace Clusters::Identify; - switch (aPath.mAttributeId) { - case Attributes::IdentifyTime::Id: { - using TypeInfo = Attributes::IdentifyTime::TypeInfo; + case Attributes::LineCurrentPhaseB::Id: { + using TypeInfo = Attributes::LineCurrentPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -5713,97 +5507,52 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::IdentifyType::Id: { - using TypeInfo = Attributes::IdentifyType::TypeInfo; + case Attributes::ActiveCurrentPhaseB::Id: { + using TypeInfo = Attributes::ActiveCurrentPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ReactiveCurrentPhaseB::Id: { + using TypeInfo = Attributes::ReactiveCurrentPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::RmsVoltagePhaseB::Id: { + using TypeInfo = Attributes::RmsVoltagePhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::RmsVoltageMinPhaseB::Id: { + using TypeInfo = Attributes::RmsVoltageMinPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::RmsVoltageMaxPhaseB::Id: { + using TypeInfo = Attributes::RmsVoltageMaxPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -5813,166 +5562,107 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::IlluminanceMeasurement::Id: { - using namespace Clusters::IlluminanceMeasurement; - switch (aPath.mAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::RmsCurrentPhaseB::Id: { + using TypeInfo = Attributes::RmsCurrentPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + case Attributes::RmsCurrentMinPhaseB::Id: { + using TypeInfo = Attributes::RmsCurrentMinPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + case Attributes::RmsCurrentMaxPhaseB::Id: { + using TypeInfo = Attributes::RmsCurrentMaxPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; + case Attributes::ActivePowerPhaseB::Id: { + using TypeInfo = Attributes::ActivePowerPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::LightSensorType::Id: { - using TypeInfo = Attributes::LightSensorType::TypeInfo; + case Attributes::ActivePowerMinPhaseB::Id: { + using TypeInfo = Attributes::ActivePowerMinPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ActivePowerMaxPhaseB::Id: { + using TypeInfo = Attributes::ActivePowerMaxPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ReactivePowerPhaseB::Id: { + using TypeInfo = Attributes::ReactivePowerPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::ApparentPowerPhaseB::Id: { + using TypeInfo = Attributes::ApparentPowerPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::PowerFactorPhaseB::Id: { + using TypeInfo = Attributes::PowerFactorPhaseB::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { + using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -5982,95 +5672,41 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::KeypadInput::Id: { - using namespace Clusters::KeypadInput; - switch (aPath.mAttributeId) { - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::AverageRmsOverVoltageCounterPhaseB::Id: { + using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::AverageRmsUnderVoltageCounterPhaseB::Id: { + using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id: { + using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id: { + using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6080,28 +5716,19 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::LevelControl::Id: { - using namespace Clusters::LevelControl; - switch (aPath.mAttributeId) { - case Attributes::CurrentLevel::Id: { - using TypeInfo = Attributes::CurrentLevel::TypeInfo; + case Attributes::RmsVoltageSagPeriodPhaseB::Id: { + using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::RemainingTime::Id: { - using TypeInfo = Attributes::RemainingTime::TypeInfo; + case Attributes::RmsVoltageSwellPeriodPhaseB::Id: { + using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6111,41 +5738,41 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MinLevel::Id: { - using TypeInfo = Attributes::MinLevel::TypeInfo; + case Attributes::LineCurrentPhaseC::Id: { + using TypeInfo = Attributes::LineCurrentPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MaxLevel::Id: { - using TypeInfo = Attributes::MaxLevel::TypeInfo; + case Attributes::ActiveCurrentPhaseC::Id: { + using TypeInfo = Attributes::ActiveCurrentPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::CurrentFrequency::Id: { - using TypeInfo = Attributes::CurrentFrequency::TypeInfo; + case Attributes::ReactiveCurrentPhaseC::Id: { + using TypeInfo = Attributes::ReactiveCurrentPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::MinFrequency::Id: { - using TypeInfo = Attributes::MinFrequency::TypeInfo; + case Attributes::RmsVoltagePhaseC::Id: { + using TypeInfo = Attributes::RmsVoltagePhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6155,8 +5782,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MaxFrequency::Id: { - using TypeInfo = Attributes::MaxFrequency::TypeInfo; + case Attributes::RmsVoltageMinPhaseC::Id: { + using TypeInfo = Attributes::RmsVoltageMinPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6166,19 +5793,19 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Options::Id: { - using TypeInfo = Attributes::Options::TypeInfo; + case Attributes::RmsVoltageMaxPhaseC::Id: { + using TypeInfo = Attributes::RmsVoltageMaxPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::OnOffTransitionTime::Id: { - using TypeInfo = Attributes::OnOffTransitionTime::TypeInfo; + case Attributes::RmsCurrentPhaseC::Id: { + using TypeInfo = Attributes::RmsCurrentPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6188,172 +5815,107 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::OnLevel::Id: { - using TypeInfo = Attributes::OnLevel::TypeInfo; + case Attributes::RmsCurrentMinPhaseC::Id: { + using TypeInfo = Attributes::RmsCurrentMinPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::OnTransitionTime::Id: { - using TypeInfo = Attributes::OnTransitionTime::TypeInfo; + case Attributes::RmsCurrentMaxPhaseC::Id: { + using TypeInfo = Attributes::RmsCurrentMaxPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::OffTransitionTime::Id: { - using TypeInfo = Attributes::OffTransitionTime::TypeInfo; + case Attributes::ActivePowerPhaseC::Id: { + using TypeInfo = Attributes::ActivePowerPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::DefaultMoveRate::Id: { - using TypeInfo = Attributes::DefaultMoveRate::TypeInfo; + case Attributes::ActivePowerMinPhaseC::Id: { + using TypeInfo = Attributes::ActivePowerMinPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::StartUpCurrentLevel::Id: { - using TypeInfo = Attributes::StartUpCurrentLevel::TypeInfo; + case Attributes::ActivePowerMaxPhaseC::Id: { + using TypeInfo = Attributes::ActivePowerMaxPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ReactivePowerPhaseC::Id: { + using TypeInfo = Attributes::ReactivePowerPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ApparentPowerPhaseC::Id: { + using TypeInfo = Attributes::ApparentPowerPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::PowerFactorPhaseC::Id: { + using TypeInfo = Attributes::PowerFactorPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { + using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { + using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6363,108 +5925,52 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::LocalizationConfiguration::Id: { - using namespace Clusters::LocalizationConfiguration; - switch (aPath.mAttributeId) { - case Attributes::ActiveLocale::Id: { - using TypeInfo = Attributes::ActiveLocale::TypeInfo; + case Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { + using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::SupportedLocales::Id: { - using TypeInfo = Attributes::SupportedLocales::TypeInfo; + case Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSString * newElement_0; - newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() - length:entry_0.size() - encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::RmsVoltageSagPeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::RmsVoltageSwellPeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6474,15 +5980,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::LowPower::Id: { - using namespace Clusters::LowPower; - switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6561,6 +6058,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6578,52 +6086,118 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::MediaInput::Id: { - using namespace Clusters::MediaInput; + case Clusters::EthernetNetworkDiagnostics::Id: { + using namespace Clusters::EthernetNetworkDiagnostics; switch (aPath.mAttributeId) { - case Attributes::InputList::Id: { - using TypeInfo = Attributes::InputList::TypeInfo; + case Attributes::PHYRate::Id: { + using TypeInfo = Attributes::PHYRate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPMediaInputClusterInputInfo * newElement_0; - newElement_0 = [CHIPMediaInputClusterInputInfo new]; - newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.descriptionString = [[NSString alloc] initWithBytes:entry_0.description.data() - length:entry_0.description.size() - encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; } return value; } - case Attributes::CurrentInput::Id: { - using TypeInfo = Attributes::CurrentInput::TypeInfo; + case Attributes::FullDuplex::Id: { + using TypeInfo = Attributes::FullDuplex::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithBool:cppValue.Value()]; + } + return value; + } + case Attributes::PacketRxCount::Id: { + using TypeInfo = Attributes::PacketRxCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::PacketTxCount::Id: { + using TypeInfo = Attributes::PacketTxCount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::TxErrCount::Id: { + using TypeInfo = Attributes::TxErrCount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::CollisionCount::Id: { + using TypeInfo = Attributes::CollisionCount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::OverrunCount::Id: { + using TypeInfo = Attributes::OverrunCount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::CarrierDetect::Id: { + using TypeInfo = Attributes::CarrierDetect::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithBool:cppValue.Value()]; + } + return value; + } + case Attributes::TimeSinceReset::Id: { + using TypeInfo = Attributes::TimeSinceReset::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -6704,8 +6278,19 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6721,11 +6306,11 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::MediaPlayback::Id: { - using namespace Clusters::MediaPlayback; + case Clusters::FanControl::Id: { + using namespace Clusters::FanControl; switch (aPath.mAttributeId) { - case Attributes::CurrentState::Id: { - using TypeInfo = Attributes::CurrentState::TypeInfo; + case Attributes::FanMode::Id: { + using TypeInfo = Attributes::FanMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6735,96 +6320,114 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::StartTime::Id: { - using TypeInfo = Attributes::StartTime::TypeInfo; + case Attributes::FanModeSequence::Id: { + using TypeInfo = Attributes::FanModeSequence::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::Duration::Id: { - using TypeInfo = Attributes::Duration::TypeInfo; + case Attributes::PercentSetting::Id: { + using TypeInfo = Attributes::PercentSetting::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::PercentCurrent::Id: { + using TypeInfo = Attributes::PercentCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::SampledPosition::Id: { - using TypeInfo = Attributes::SampledPosition::TypeInfo; + case Attributes::SpeedMax::Id: { + using TypeInfo = Attributes::SpeedMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [CHIPMediaPlaybackClusterPlaybackPosition new]; - value.updatedAt = [NSNumber numberWithUnsignedLongLong:cppValue.Value().updatedAt]; - if (cppValue.Value().position.IsNull()) { - value.position = nil; - } else { - value.position = [NSNumber numberWithUnsignedLongLong:cppValue.Value().position.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::SpeedSetting::Id: { + using TypeInfo = Attributes::SpeedSetting::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::PlaybackSpeed::Id: { - using TypeInfo = Attributes::PlaybackSpeed::TypeInfo; + case Attributes::SpeedCurrent::Id: { + using TypeInfo = Attributes::SpeedCurrent::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::SeekRangeEnd::Id: { - using TypeInfo = Attributes::SeekRangeEnd::TypeInfo; + case Attributes::RockSupport::Id: { + using TypeInfo = Attributes::RockSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::RockSetting::Id: { + using TypeInfo = Attributes::RockSetting::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::SeekRangeStart::Id: { - using TypeInfo = Attributes::SeekRangeStart::TypeInfo; + case Attributes::WindSupport::Id: { + using TypeInfo = Attributes::WindSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::WindSetting::Id: { + using TypeInfo = Attributes::WindSetting::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -6905,6 +6508,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6922,37 +6536,11 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::ModeSelect::Id: { - using namespace Clusters::ModeSelect; + case Clusters::FixedLabel::Id: { + using namespace Clusters::FixedLabel; switch (aPath.mAttributeId) { - case Attributes::Description::Id: { - using TypeInfo = Attributes::Description::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; - return value; - } - case Attributes::StandardNamespace::Id: { - using TypeInfo = Attributes::StandardNamespace::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; + case Attributes::LabelList::Id: { + using TypeInfo = Attributes::LabelList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6964,13 +6552,14 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPModeSelectClusterModeOptionStruct * newElement_0; - newElement_0 = [CHIPModeSelectClusterModeOptionStruct new]; + CHIPFixedLabelClusterLabelStruct * newElement_0; + newElement_0 = [CHIPFixedLabelClusterLabelStruct new]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - newElement_0.semanticTag = [NSNumber numberWithUnsignedInt:entry_0.semanticTag]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6982,47 +6571,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::CurrentMode::Id: { - using TypeInfo = Attributes::CurrentMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::StartUpMode::Id: { - using TypeInfo = Attributes::StartUpMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::OnMode::Id: { - using TypeInfo = Attributes::OnMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7129,83 +6677,26 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::NetworkCommissioning::Id: { - using namespace Clusters::NetworkCommissioning; + case Clusters::FlowMeasurement::Id: { + using namespace Clusters::FlowMeasurement; switch (aPath.mAttributeId) { - case Attributes::MaxNetworks::Id: { - using TypeInfo = Attributes::MaxNetworks::TypeInfo; + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::Networks::Id: { - using TypeInfo = Attributes::Networks::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPNetworkCommissioningClusterNetworkInfo * newElement_0; - newElement_0 = [CHIPNetworkCommissioningClusterNetworkInfo new]; - newElement_0.networkID = [NSData dataWithBytes:entry_0.networkID.data() length:entry_0.networkID.size()]; - newElement_0.connected = [NSNumber numberWithBool:entry_0.connected]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::ScanMaxTimeSeconds::Id: { - using TypeInfo = Attributes::ScanMaxTimeSeconds::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::ConnectMaxTimeSeconds::Id: { - using TypeInfo = Attributes::ConnectMaxTimeSeconds::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::InterfaceEnabled::Id: { - using TypeInfo = Attributes::InterfaceEnabled::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::LastNetworkingStatus::Id: { - using TypeInfo = Attributes::LastNetworkingStatus::TypeInfo; + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7215,38 +6706,34 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::LastNetworkID::Id: { - using TypeInfo = Attributes::LastNetworkID::TypeInfo; + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSData * _Nullable value; + NSNumber * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [NSData dataWithBytes:cppValue.Value().data() length:cppValue.Value().size()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } return value; } - case Attributes::LastConnectErrorValue::Id: { - using TypeInfo = Attributes::LastConnectErrorValue::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithInt:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -7301,37 +6788,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::OtaSoftwareUpdateProvider::Id: { - using namespace Clusters::OtaSoftwareUpdateProvider; - switch (aPath.mAttributeId) { case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7358,6 +6814,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7375,152 +6842,63 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::OtaSoftwareUpdateRequestor::Id: { - using namespace Clusters::OtaSoftwareUpdateRequestor; + case Clusters::GeneralCommissioning::Id: { + using namespace Clusters::GeneralCommissioning; switch (aPath.mAttributeId) { - case Attributes::DefaultOtaProviders::Id: { - using TypeInfo = Attributes::DefaultOtaProviders::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPOtaSoftwareUpdateRequestorClusterProviderLocation * newElement_0; - newElement_0 = [CHIPOtaSoftwareUpdateRequestorClusterProviderLocation new]; - newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::UpdatePossible::Id: { - using TypeInfo = Attributes::UpdatePossible::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::UpdateState::Id: { - using TypeInfo = Attributes::UpdateState::TypeInfo; + case Attributes::Breadcrumb::Id: { + using TypeInfo = Attributes::Breadcrumb::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::UpdateStateProgress::Id: { - using TypeInfo = Attributes::UpdateStateProgress::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::BasicCommissioningInfo::Id: { + using TypeInfo = Attributes::BasicCommissioningInfo::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nonnull value; + value = [CHIPGeneralCommissioningClusterBasicCommissioningInfo new]; + value.failSafeExpiryLengthSeconds = [NSNumber numberWithUnsignedShort:cppValue.failSafeExpiryLengthSeconds]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::OccupancySensing::Id: { - using namespace Clusters::OccupancySensing; - switch (aPath.mAttributeId) { - case Attributes::Occupancy::Id: { - using TypeInfo = Attributes::Occupancy::TypeInfo; + case Attributes::RegulatoryConfig::Id: { + using TypeInfo = Attributes::RegulatoryConfig::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::OccupancySensorType::Id: { - using TypeInfo = Attributes::OccupancySensorType::TypeInfo; + case Attributes::LocationCapability::Id: { + using TypeInfo = Attributes::LocationCapability::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::OccupancySensorTypeBitmap::Id: { - using TypeInfo = Attributes::OccupancySensorTypeBitmap::TypeInfo; + case Attributes::SupportsConcurrentConnection::Id: { + using TypeInfo = Attributes::SupportsConcurrentConnection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -7601,6 +6979,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7618,70 +7007,132 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::OnOff::Id: { - using namespace Clusters::OnOff; + case Clusters::GeneralDiagnostics::Id: { + using namespace Clusters::GeneralDiagnostics; switch (aPath.mAttributeId) { - case Attributes::OnOff::Id: { - using TypeInfo = Attributes::OnOff::TypeInfo; + case Attributes::NetworkInterfaces::Id: { + using TypeInfo = Attributes::NetworkInterfaces::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPGeneralDiagnosticsClusterNetworkInterfaceType * newElement_0; + newElement_0 = [CHIPGeneralDiagnosticsClusterNetworkInterfaceType new]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.isOperational = [NSNumber numberWithBool:entry_0.isOperational]; + if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { + newElement_0.offPremiseServicesReachableIPv4 = nil; + } else { + newElement_0.offPremiseServicesReachableIPv4 = + [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4.Value()]; + } + if (entry_0.offPremiseServicesReachableIPv6.IsNull()) { + newElement_0.offPremiseServicesReachableIPv6 = nil; + } else { + newElement_0.offPremiseServicesReachableIPv6 = + [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6.Value()]; + } + newElement_0.hardwareAddress = [NSData dataWithBytes:entry_0.hardwareAddress.data() + length:entry_0.hardwareAddress.size()]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.IPv4Addresses.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.iPv4Addresses = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.IPv6Addresses.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.iPv6Addresses = array_2; + } + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::GlobalSceneControl::Id: { - using TypeInfo = Attributes::GlobalSceneControl::TypeInfo; + case Attributes::RebootCount::Id: { + using TypeInfo = Attributes::RebootCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::OnTime::Id: { - using TypeInfo = Attributes::OnTime::TypeInfo; + case Attributes::UpTime::Id: { + using TypeInfo = Attributes::UpTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; return value; } - case Attributes::OffWaitTime::Id: { - using TypeInfo = Attributes::OffWaitTime::TypeInfo; + case Attributes::TotalOperationalHours::Id: { + using TypeInfo = Attributes::TotalOperationalHours::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::StartUpOnOff::Id: { - using TypeInfo = Attributes::StartUpOnOff::TypeInfo; + case Attributes::BootReasons::Id: { + using TypeInfo = Attributes::BootReasons::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ActiveHardwareFaults::Id: { + using TypeInfo = Attributes::ActiveHardwareFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7694,7 +7145,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7706,8 +7157,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ActiveRadioFaults::Id: { + using TypeInfo = Attributes::ActiveRadioFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7720,7 +7171,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7732,8 +7183,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::ActiveNetworkFaults::Id: { + using TypeInfo = Attributes::ActiveNetworkFaults::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7746,7 +7197,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7758,59 +7209,6 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::OnOffSwitchConfiguration::Id: { - using namespace Clusters::OnOffSwitchConfiguration; - switch (aPath.mAttributeId) { - case Attributes::SwitchType::Id: { - using TypeInfo = Attributes::SwitchType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::SwitchActions::Id: { - using TypeInfo = Attributes::SwitchActions::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7889,6 +7287,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7906,11 +7315,11 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::OperationalCredentials::Id: { - using namespace Clusters::OperationalCredentials; + case Clusters::GroupKeyManagement::Id: { + using namespace Clusters::GroupKeyManagement; switch (aPath.mAttributeId) { - case Attributes::NOCs::Id: { - using TypeInfo = Attributes::NOCs::TypeInfo; + case Attributes::GroupKeyMap::Id: { + using TypeInfo = Attributes::GroupKeyMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7922,14 +7331,10 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPOperationalCredentialsClusterNOCStruct * newElement_0; - newElement_0 = [CHIPOperationalCredentialsClusterNOCStruct new]; - newElement_0.noc = [NSData dataWithBytes:entry_0.noc.data() length:entry_0.noc.size()]; - if (entry_0.icac.IsNull()) { - newElement_0.icac = nil; - } else { - newElement_0.icac = [NSData dataWithBytes:entry_0.icac.Value().data() length:entry_0.icac.Value().size()]; - } + CHIPGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; + newElement_0 = [CHIPGroupKeyManagementClusterGroupKeyMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } @@ -7942,8 +7347,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::Fabrics::Id: { - using TypeInfo = Attributes::Fabrics::TypeInfo; + case Attributes::GroupTable::Id: { + using TypeInfo = Attributes::GroupTable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7955,16 +7360,32 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPOperationalCredentialsClusterFabricDescriptor * newElement_0; - newElement_0 = [CHIPOperationalCredentialsClusterFabricDescriptor new]; - newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() - length:entry_0.rootPublicKey.size()]; - newElement_0.vendorId = [NSNumber numberWithUnsignedShort:entry_0.vendorId]; - newElement_0.fabricId = [NSNumber numberWithUnsignedLongLong:entry_0.fabricId]; - newElement_0.nodeId = [NSNumber numberWithUnsignedLongLong:entry_0.nodeId]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; + CHIPGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; + newElement_0 = [CHIPGroupKeyManagementClusterGroupInfoMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.endpoints.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.endpoints = array_2; + } + if (entry_0.groupName.HasValue()) { + newElement_0.groupName = [[NSString alloc] initWithBytes:entry_0.groupName.Value().data() + length:entry_0.groupName.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.groupName = nil; + } newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } @@ -7977,63 +7398,26 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::SupportedFabrics::Id: { - using TypeInfo = Attributes::SupportedFabrics::TypeInfo; + case Attributes::MaxGroupsPerFabric::Id: { + using TypeInfo = Attributes::MaxGroupsPerFabric::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::CommissionedFabrics::Id: { - using TypeInfo = Attributes::CommissionedFabrics::TypeInfo; + case Attributes::MaxGroupKeysPerFabric::Id: { + using TypeInfo = Attributes::MaxGroupKeysPerFabric::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::TrustedRootCertificates::Id: { - using TypeInfo = Attributes::TrustedRootCertificates::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSData * newElement_0; - newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::CurrentFabricIndex::Id: { - using TypeInfo = Attributes::CurrentFabricIndex::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -8114,6 +7498,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -8131,11 +7526,11 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::PowerSource::Id: { - using namespace Clusters::PowerSource; + case Clusters::Groups::Id: { + using namespace Clusters::Groups; switch (aPath.mAttributeId) { - case Attributes::Status::Id: { - using TypeInfo = Attributes::Status::TypeInfo; + case Attributes::NameSupport::Id: { + using TypeInfo = Attributes::NameSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8145,107 +7540,191 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::Order::Id: { - using TypeInfo = Attributes::Order::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::Description::Id: { - using TypeInfo = Attributes::Description::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::WiredAssessedInputVoltage::Id: { - using TypeInfo = Attributes::WiredAssessedInputVoltage::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::WiredAssessedInputFrequency::Id: { - using TypeInfo = Attributes::WiredAssessedInputFrequency::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::WiredCurrentType::Id: { - using TypeInfo = Attributes::WiredCurrentType::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::WiredAssessedCurrent::Id: { - using TypeInfo = Attributes::WiredAssessedCurrent::TypeInfo; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::Identify::Id: { + using namespace Clusters::Identify; + switch (aPath.mAttributeId) { + case Attributes::IdentifyTime::Id: { + using TypeInfo = Attributes::IdentifyTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::WiredNominalVoltage::Id: { - using TypeInfo = Attributes::WiredNominalVoltage::TypeInfo; + case Attributes::IdentifyType::Id: { + using TypeInfo = Attributes::IdentifyType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::WiredMaximumCurrent::Id: { - using TypeInfo = Attributes::WiredMaximumCurrent::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::WiredPresent::Id: { - using TypeInfo = Attributes::WiredPresent::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::ActiveWiredFaults::Id: { - using TypeInfo = Attributes::ActiveWiredFaults::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8258,7 +7737,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -8270,8 +7749,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::BatteryVoltage::Id: { - using TypeInfo = Attributes::BatteryVoltage::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8281,242 +7760,94 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::BatteryPercentRemaining::Id: { - using TypeInfo = Attributes::BatteryPercentRemaining::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::BatteryTimeRemaining::Id: { - using TypeInfo = Attributes::BatteryTimeRemaining::TypeInfo; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::IlluminanceMeasurement::Id: { + using namespace Clusters::IlluminanceMeasurement; + switch (aPath.mAttributeId) { + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::BatteryChargeLevel::Id: { - using TypeInfo = Attributes::BatteryChargeLevel::TypeInfo; + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::BatteryReplacementNeeded::Id: { - using TypeInfo = Attributes::BatteryReplacementNeeded::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::BatteryReplaceability::Id: { - using TypeInfo = Attributes::BatteryReplaceability::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::BatteryPresent::Id: { - using TypeInfo = Attributes::BatteryPresent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::ActiveBatteryFaults::Id: { - using TypeInfo = Attributes::ActiveBatteryFaults::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::BatteryReplacementDescription::Id: { - using TypeInfo = Attributes::BatteryReplacementDescription::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; - return value; - } - case Attributes::BatteryCommonDesignation::Id: { - using TypeInfo = Attributes::BatteryCommonDesignation::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::BatteryANSIDesignation::Id: { - using TypeInfo = Attributes::BatteryANSIDesignation::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; - return value; - } - case Attributes::BatteryIECDesignation::Id: { - using TypeInfo = Attributes::BatteryIECDesignation::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; - return value; - } - case Attributes::BatteryApprovedChemistry::Id: { - using TypeInfo = Attributes::BatteryApprovedChemistry::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::BatteryCapacity::Id: { - using TypeInfo = Attributes::BatteryCapacity::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::BatteryQuantity::Id: { - using TypeInfo = Attributes::BatteryQuantity::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::BatteryChargeState::Id: { - using TypeInfo = Attributes::BatteryChargeState::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::BatteryTimeToFullCharge::Id: { - using TypeInfo = Attributes::BatteryTimeToFullCharge::TypeInfo; + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::BatteryFunctionalWhileCharging::Id: { - using TypeInfo = Attributes::BatteryFunctionalWhileCharging::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::BatteryChargingCurrent::Id: { - using TypeInfo = Attributes::BatteryChargingCurrent::TypeInfo; + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ActiveBatteryChargeFaults::Id: { - using TypeInfo = Attributes::ActiveBatteryChargeFaults::TypeInfo; + case Attributes::LightSensorType::Id: { + using TypeInfo = Attributes::LightSensorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } @@ -8626,35 +7957,9 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::PowerSourceConfiguration::Id: { - using namespace Clusters::PowerSourceConfiguration; + case Clusters::KeypadInput::Id: { + using namespace Clusters::KeypadInput; switch (aPath.mAttributeId) { - case Attributes::Sources::Id: { - using TypeInfo = Attributes::Sources::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -8733,6 +8038,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -8750,56 +8066,22 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::PressureMeasurement::Id: { - using namespace Clusters::PressureMeasurement; + case Clusters::LevelControl::Id: { + using namespace Clusters::LevelControl; switch (aPath.mAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; + case Attributes::CurrentLevel::Id: { + using TypeInfo = Attributes::CurrentLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; + case Attributes::RemainingTime::Id: { + using TypeInfo = Attributes::RemainingTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8809,53 +8091,41 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ScaledValue::Id: { - using TypeInfo = Attributes::ScaledValue::TypeInfo; + case Attributes::MinLevel::Id: { + using TypeInfo = Attributes::MinLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MinScaledValue::Id: { - using TypeInfo = Attributes::MinScaledValue::TypeInfo; + case Attributes::MaxLevel::Id: { + using TypeInfo = Attributes::MaxLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MaxScaledValue::Id: { - using TypeInfo = Attributes::MaxScaledValue::TypeInfo; + case Attributes::CurrentFrequency::Id: { + using TypeInfo = Attributes::CurrentFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::ScaledTolerance::Id: { - using TypeInfo = Attributes::ScaledTolerance::TypeInfo; + case Attributes::MinFrequency::Id: { + using TypeInfo = Attributes::MinFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8865,45 +8135,30 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Scale::Id: { - using TypeInfo = Attributes::Scale::TypeInfo; + case Attributes::MaxFrequency::Id: { + using TypeInfo = Attributes::MaxFrequency::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::Options::Id: { + using TypeInfo = Attributes::Options::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::OnOffTransitionTime::Id: { + using TypeInfo = Attributes::OnOffTransitionTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8913,17 +8168,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::PumpConfigurationAndControl::Id: { - using namespace Clusters::PumpConfigurationAndControl; - switch (aPath.mAttributeId) { - case Attributes::MaxPressure::Id: { - using TypeInfo = Attributes::MaxPressure::TypeInfo; + case Attributes::OnLevel::Id: { + using TypeInfo = Attributes::OnLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8933,12 +8179,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::MaxSpeed::Id: { - using TypeInfo = Attributes::MaxSpeed::TypeInfo; + case Attributes::OnTransitionTime::Id: { + using TypeInfo = Attributes::OnTransitionTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8952,8 +8198,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::MaxFlow::Id: { - using TypeInfo = Attributes::MaxFlow::TypeInfo; + case Attributes::OffTransitionTime::Id: { + using TypeInfo = Attributes::OffTransitionTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8967,8 +8213,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::MinConstPressure::Id: { - using TypeInfo = Attributes::MinConstPressure::TypeInfo; + case Attributes::DefaultMoveRate::Id: { + using TypeInfo = Attributes::DefaultMoveRate::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8978,12 +8224,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::MaxConstPressure::Id: { - using TypeInfo = Attributes::MaxConstPressure::TypeInfo; + case Attributes::StartUpCurrentLevel::Id: { + using TypeInfo = Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -8993,269 +8239,156 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::MinCompPressure::Id: { - using TypeInfo = Attributes::MinCompPressure::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::MaxCompPressure::Id: { - using TypeInfo = Attributes::MaxCompPressure::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::MinConstSpeed::Id: { - using TypeInfo = Attributes::MinConstSpeed::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::MaxConstSpeed::Id: { - using TypeInfo = Attributes::MaxConstSpeed::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::MinConstFlow::Id: { - using TypeInfo = Attributes::MinConstFlow::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MaxConstFlow::Id: { - using TypeInfo = Attributes::MaxConstFlow::TypeInfo; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::LocalizationConfiguration::Id: { + using namespace Clusters::LocalizationConfiguration; + switch (aPath.mAttributeId) { + case Attributes::ActiveLocale::Id: { + using TypeInfo = Attributes::ActiveLocale::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinConstTemp::Id: { - using TypeInfo = Attributes::MinConstTemp::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxConstTemp::Id: { - using TypeInfo = Attributes::MaxConstTemp::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::PumpStatus::Id: { - using TypeInfo = Attributes::PumpStatus::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::EffectiveOperationMode::Id: { - using TypeInfo = Attributes::EffectiveOperationMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::EffectiveControlMode::Id: { - using TypeInfo = Attributes::EffectiveControlMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::Capacity::Id: { - using TypeInfo = Attributes::Capacity::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::Speed::Id: { - using TypeInfo = Attributes::Speed::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::LifetimeRunningHours::Id: { - using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::Power::Id: { - using TypeInfo = Attributes::Power::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::LifetimeEnergyConsumed::Id: { - using TypeInfo = Attributes::LifetimeEnergyConsumed::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; - } - return value; - } - case Attributes::OperationMode::Id: { - using TypeInfo = Attributes::OperationMode::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; return value; } - case Attributes::ControlMode::Id: { - using TypeInfo = Attributes::ControlMode::TypeInfo; + case Attributes::SupportedLocales::Id: { + using TypeInfo = Attributes::SupportedLocales::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::AlarmMask::Id: { - using TypeInfo = Attributes::AlarmMask::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSString * newElement_0; + newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() + length:entry_0.size() + encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } case Attributes::GeneratedCommandList::Id: { @@ -9364,65 +8497,9 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::RelativeHumidityMeasurement::Id: { - using namespace Clusters::RelativeHumidityMeasurement; + case Clusters::LowPower::Id: { + using namespace Clusters::LowPower; switch (aPath.mAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -9501,72 +8578,73 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::Scenes::Id: { - using namespace Clusters::Scenes; - switch (aPath.mAttributeId) { - case Attributes::SceneCount::Id: { - using TypeInfo = Attributes::SceneCount::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::CurrentScene::Id: { - using TypeInfo = Attributes::CurrentScene::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; } - case Attributes::CurrentGroup::Id: { - using TypeInfo = Attributes::CurrentGroup::TypeInfo; + break; + } + case Clusters::MediaInput::Id: { + using namespace Clusters::MediaInput; + switch (aPath.mAttributeId) { + case Attributes::InputList::Id: { + using TypeInfo = Attributes::InputList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::SceneValid::Id: { - using TypeInfo = Attributes::SceneValid::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPMediaInputClusterInputInfo * newElement_0; + newElement_0 = [CHIPMediaInputClusterInputInfo new]; + newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; + newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.descriptionString = [[NSString alloc] initWithBytes:entry_0.description.data() + length:entry_0.description.size() + encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::NameSupport::Id: { - using TypeInfo = Attributes::NameSupport::TypeInfo; + case Attributes::CurrentInput::Id: { + using TypeInfo = Attributes::CurrentInput::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -9654,6 +8732,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -9671,73 +8760,110 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::SoftwareDiagnostics::Id: { - using namespace Clusters::SoftwareDiagnostics; + case Clusters::MediaPlayback::Id: { + using namespace Clusters::MediaPlayback; switch (aPath.mAttributeId) { - case Attributes::ThreadMetrics::Id: { - using TypeInfo = Attributes::ThreadMetrics::TypeInfo; + case Attributes::CurrentState::Id: { + using TypeInfo = Attributes::CurrentState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPSoftwareDiagnosticsClusterThreadMetrics * newElement_0; - newElement_0 = [CHIPSoftwareDiagnosticsClusterThreadMetrics new]; - newElement_0.id = [NSNumber numberWithUnsignedLongLong:entry_0.id]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.stackFreeCurrent = [NSNumber numberWithUnsignedInt:entry_0.stackFreeCurrent]; - newElement_0.stackFreeMinimum = [NSNumber numberWithUnsignedInt:entry_0.stackFreeMinimum]; - newElement_0.stackSize = [NSNumber numberWithUnsignedInt:entry_0.stackSize]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::StartTime::Id: { + using TypeInfo = Attributes::StartTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::Duration::Id: { + using TypeInfo = Attributes::Duration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::SampledPosition::Id: { + using TypeInfo = Attributes::SampledPosition::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [CHIPMediaPlaybackClusterPlaybackPosition new]; + value.updatedAt = [NSNumber numberWithUnsignedLongLong:cppValue.Value().updatedAt]; + if (cppValue.Value().position.IsNull()) { + value.position = nil; + } else { + value.position = [NSNumber numberWithUnsignedLongLong:cppValue.Value().position.Value()]; } - value = array_0; } return value; } - case Attributes::CurrentHeapFree::Id: { - using TypeInfo = Attributes::CurrentHeapFree::TypeInfo; + case Attributes::PlaybackSpeed::Id: { + using TypeInfo = Attributes::PlaybackSpeed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithFloat:cppValue]; return value; } - case Attributes::CurrentHeapUsed::Id: { - using TypeInfo = Attributes::CurrentHeapUsed::TypeInfo; + case Attributes::SeekRangeEnd::Id: { + using TypeInfo = Attributes::SeekRangeEnd::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } - case Attributes::CurrentHeapHighWatermark::Id: { - using TypeInfo = Attributes::CurrentHeapHighWatermark::TypeInfo; + case Attributes::SeekRangeStart::Id: { + using TypeInfo = Attributes::SeekRangeStart::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } case Attributes::GeneratedCommandList::Id: { @@ -9846,44 +8972,37 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::Switch::Id: { - using namespace Clusters::Switch; + case Clusters::ModeSelect::Id: { + using namespace Clusters::ModeSelect; switch (aPath.mAttributeId) { - case Attributes::NumberOfPositions::Id: { - using TypeInfo = Attributes::NumberOfPositions::TypeInfo; + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; return value; } - case Attributes::CurrentPosition::Id: { - using TypeInfo = Attributes::CurrentPosition::TypeInfo; + case Attributes::StandardNamespace::Id: { + using TypeInfo = Attributes::StandardNamespace::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::MultiPressMax::Id: { - using TypeInfo = Attributes::MultiPressMax::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -9895,8 +9014,13 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + CHIPModeSelectClusterModeOptionStruct * newElement_0; + newElement_0 = [CHIPModeSelectClusterModeOptionStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + newElement_0.semanticTag = [NSNumber numberWithUnsignedInt:entry_0.semanticTag]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9908,23 +9032,90 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } CHIP_ERROR err = iter_0.GetStatus(); if (err != CHIP_NO_ERROR) { *aError = err; @@ -9988,11 +9179,22 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::TargetNavigator::Id: { - using namespace Clusters::TargetNavigator; + case Clusters::NetworkCommissioning::Id: { + using namespace Clusters::NetworkCommissioning; switch (aPath.mAttributeId) { - case Attributes::TargetList::Id: { - using TypeInfo = Attributes::TargetList::TypeInfo; + case Attributes::MaxNetworks::Id: { + using TypeInfo = Attributes::MaxNetworks::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::Networks::Id: { + using TypeInfo = Attributes::Networks::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10004,12 +9206,10 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPTargetNavigatorClusterTargetInfo * newElement_0; - newElement_0 = [CHIPTargetNavigatorClusterTargetInfo new]; - newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + CHIPNetworkCommissioningClusterNetworkInfo * newElement_0; + newElement_0 = [CHIPNetworkCommissioningClusterNetworkInfo new]; + newElement_0.networkID = [NSData dataWithBytes:entry_0.networkID.data() length:entry_0.networkID.size()]; + newElement_0.connected = [NSNumber numberWithBool:entry_0.connected]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10021,8 +9221,19 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::CurrentTarget::Id: { - using TypeInfo = Attributes::CurrentTarget::TypeInfo; + case Attributes::ScanMaxTimeSeconds::Id: { + using TypeInfo = Attributes::ScanMaxTimeSeconds::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::ConnectMaxTimeSeconds::Id: { + using TypeInfo = Attributes::ConnectMaxTimeSeconds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10032,6 +9243,62 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } + case Attributes::InterfaceEnabled::Id: { + using TypeInfo = Attributes::InterfaceEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::LastNetworkingStatus::Id: { + using TypeInfo = Attributes::LastNetworkingStatus::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } + return value; + } + case Attributes::LastNetworkID::Id: { + using TypeInfo = Attributes::LastNetworkID::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSData * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSData dataWithBytes:cppValue.Value().data() length:cppValue.Value().size()]; + } + return value; + } + case Attributes::LastConnectErrorValue::Id: { + using TypeInfo = Attributes::LastConnectErrorValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithInt:cppValue.Value()]; + } + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -10110,6 +9377,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -10127,67 +9405,11 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } break; } - case Clusters::TemperatureMeasurement::Id: { - using namespace Clusters::TemperatureMeasurement; + case Clusters::OtaSoftwareUpdateProvider::Id: { + using namespace Clusters::OtaSoftwareUpdateProvider; switch (aPath.mAttributeId) { - case Attributes::MeasuredValue::Id: { - using TypeInfo = Attributes::MeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MinMeasuredValue::Id: { - using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::MaxMeasuredValue::Id: { - using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } - return value; - } - case Attributes::Tolerance::Id: { - using TypeInfo = Attributes::Tolerance::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10212,270 +9434,376 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::TestCluster::Id: { - using namespace Clusters::TestCluster; - switch (aPath.mAttributeId) { - case Attributes::Boolean::Id: { - using TypeInfo = Attributes::Boolean::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::Bitmap8::Id: { - using TypeInfo = Attributes::Bitmap8::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::Bitmap16::Id: { - using TypeInfo = Attributes::Bitmap16::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Bitmap32::Id: { - using TypeInfo = Attributes::Bitmap32::TypeInfo; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::OtaSoftwareUpdateRequestor::Id: { + using namespace Clusters::OtaSoftwareUpdateRequestor; + switch (aPath.mAttributeId) { + case Attributes::DefaultOtaProviders::Id: { + using TypeInfo = Attributes::DefaultOtaProviders::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPOtaSoftwareUpdateRequestorClusterProviderLocation * newElement_0; + newElement_0 = [CHIPOtaSoftwareUpdateRequestorClusterProviderLocation new]; + newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::Bitmap64::Id: { - using TypeInfo = Attributes::Bitmap64::TypeInfo; + case Attributes::UpdatePossible::Id: { + using TypeInfo = Attributes::UpdatePossible::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue.Raw()]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::Int8u::Id: { - using TypeInfo = Attributes::Int8u::TypeInfo; + case Attributes::UpdateState::Id: { + using TypeInfo = Attributes::UpdateState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::Int16u::Id: { - using TypeInfo = Attributes::Int16u::TypeInfo; + case Attributes::UpdateStateProgress::Id: { + using TypeInfo = Attributes::UpdateStateProgress::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::Int24u::Id: { - using TypeInfo = Attributes::Int24u::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::Int32u::Id: { - using TypeInfo = Attributes::Int32u::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::Int40u::Id: { - using TypeInfo = Attributes::Int40u::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::Int48u::Id: { - using TypeInfo = Attributes::Int48u::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::Int56u::Id: { - using TypeInfo = Attributes::Int56u::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Int64u::Id: { - using TypeInfo = Attributes::Int64u::TypeInfo; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::OccupancySensing::Id: { + using namespace Clusters::OccupancySensing; + switch (aPath.mAttributeId) { + case Attributes::Occupancy::Id: { + using TypeInfo = Attributes::Occupancy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::Int8s::Id: { - using TypeInfo = Attributes::Int8s::TypeInfo; + case Attributes::OccupancySensorType::Id: { + using TypeInfo = Attributes::OccupancySensorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::Int16s::Id: { - using TypeInfo = Attributes::Int16s::TypeInfo; + case Attributes::OccupancySensorTypeBitmap::Id: { + using TypeInfo = Attributes::OccupancySensorTypeBitmap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::Int24s::Id: { - using TypeInfo = Attributes::Int24s::TypeInfo; + case Attributes::PirOccupiedToUnoccupiedDelay::Id: { + using TypeInfo = Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Int32s::Id: { - using TypeInfo = Attributes::Int32s::TypeInfo; + case Attributes::PirUnoccupiedToOccupiedDelay::Id: { + using TypeInfo = Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithInt:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Int40s::Id: { - using TypeInfo = Attributes::Int40s::TypeInfo; + case Attributes::PirUnoccupiedToOccupiedThreshold::Id: { + using TypeInfo = Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithLongLong:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::Int48s::Id: { - using TypeInfo = Attributes::Int48s::TypeInfo; + case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: { + using TypeInfo = Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithLongLong:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Int56s::Id: { - using TypeInfo = Attributes::Int56s::TypeInfo; + case Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id: { + using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithLongLong:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Int64s::Id: { - using TypeInfo = Attributes::Int64s::TypeInfo; + case Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id: { + using TypeInfo = Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithLongLong:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::Enum8::Id: { - using TypeInfo = Attributes::Enum8::TypeInfo; + case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { + using TypeInfo = Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::Enum16::Id: { - using TypeInfo = Attributes::Enum16::TypeInfo; + case Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id: { + using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10485,41 +9813,71 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::FloatSingle::Id: { - using TypeInfo = Attributes::FloatSingle::TypeInfo; + case Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id: { + using TypeInfo = Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithFloat:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::FloatDouble::Id: { - using TypeInfo = Attributes::FloatDouble::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithDouble:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::OctetString::Id: { - using TypeInfo = Attributes::OctetString::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSData * _Nonnull value; - value = [NSData dataWithBytes:cppValue.data() length:cppValue.size()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::ListInt8u::Id: { - using TypeInfo = Attributes::ListInt8u::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10532,7 +9890,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10544,8 +9902,98 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::ListOctetString::Id: { - using TypeInfo = Attributes::ListOctetString::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::OnOff::Id: { + using namespace Clusters::OnOff; + switch (aPath.mAttributeId) { + case Attributes::OnOff::Id: { + using TypeInfo = Attributes::OnOff::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::GlobalSceneControl::Id: { + using TypeInfo = Attributes::GlobalSceneControl::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::OnTime::Id: { + using TypeInfo = Attributes::OnTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::OffWaitTime::Id: { + using TypeInfo = Attributes::OffWaitTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::StartUpOnOff::Id: { + using TypeInfo = Attributes::StartUpOnOff::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10557,8 +10005,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSData * newElement_0; - newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10570,8 +10018,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::ListStructOctetString::Id: { - using TypeInfo = Attributes::ListStructOctetString::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10583,11 +10031,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPTestClusterClusterTestListStructOctet * newElement_0; - newElement_0 = [CHIPTestClusterClusterTestListStructOctet new]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedLongLong:entry_0.fabricIndex]; - newElement_0.operationalCert = [NSData dataWithBytes:entry_0.operationalCert.data() - length:entry_0.operationalCert.size()]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10599,74 +10044,113 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::LongOctetString::Id: { - using TypeInfo = Attributes::LongOctetString::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSData * _Nonnull value; - value = [NSData dataWithBytes:cppValue.data() length:cppValue.size()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::CharString::Id: { - using TypeInfo = Attributes::CharString::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::LongCharString::Id: { - using TypeInfo = Attributes::LongCharString::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::EpochUs::Id: { - using TypeInfo = Attributes::EpochUs::TypeInfo; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::OnOffSwitchConfiguration::Id: { + using namespace Clusters::OnOffSwitchConfiguration; + switch (aPath.mAttributeId) { + case Attributes::SwitchType::Id: { + using TypeInfo = Attributes::SwitchType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::EpochS::Id: { - using TypeInfo = Attributes::EpochS::TypeInfo; + case Attributes::SwitchActions::Id: { + using TypeInfo = Attributes::SwitchActions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::VendorId::Id: { - using TypeInfo = Attributes::VendorId::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::ListNullablesAndOptionalsStruct::Id: { - using TypeInfo = Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10678,180 +10162,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPTestClusterClusterNullablesAndOptionalsStruct * newElement_0; - newElement_0 = [CHIPTestClusterClusterNullablesAndOptionalsStruct new]; - if (entry_0.nullableInt.IsNull()) { - newElement_0.nullableInt = nil; - } else { - newElement_0.nullableInt = [NSNumber numberWithUnsignedShort:entry_0.nullableInt.Value()]; - } - if (entry_0.optionalInt.HasValue()) { - newElement_0.optionalInt = [NSNumber numberWithUnsignedShort:entry_0.optionalInt.Value()]; - } else { - newElement_0.optionalInt = nil; - } - if (entry_0.nullableOptionalInt.HasValue()) { - if (entry_0.nullableOptionalInt.Value().IsNull()) { - newElement_0.nullableOptionalInt = nil; - } else { - newElement_0.nullableOptionalInt = - [NSNumber numberWithUnsignedShort:entry_0.nullableOptionalInt.Value().Value()]; - } - } else { - newElement_0.nullableOptionalInt = nil; - } - if (entry_0.nullableString.IsNull()) { - newElement_0.nullableString = nil; - } else { - newElement_0.nullableString = [[NSString alloc] initWithBytes:entry_0.nullableString.Value().data() - length:entry_0.nullableString.Value().size() - encoding:NSUTF8StringEncoding]; - } - if (entry_0.optionalString.HasValue()) { - newElement_0.optionalString = [[NSString alloc] initWithBytes:entry_0.optionalString.Value().data() - length:entry_0.optionalString.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - newElement_0.optionalString = nil; - } - if (entry_0.nullableOptionalString.HasValue()) { - if (entry_0.nullableOptionalString.Value().IsNull()) { - newElement_0.nullableOptionalString = nil; - } else { - newElement_0.nullableOptionalString = - [[NSString alloc] initWithBytes:entry_0.nullableOptionalString.Value().Value().data() - length:entry_0.nullableOptionalString.Value().Value().size() - encoding:NSUTF8StringEncoding]; - } - } else { - newElement_0.nullableOptionalString = nil; - } - if (entry_0.nullableStruct.IsNull()) { - newElement_0.nullableStruct = nil; - } else { - newElement_0.nullableStruct = [CHIPTestClusterClusterSimpleStruct new]; - newElement_0.nullableStruct.a = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().a]; - newElement_0.nullableStruct.b = [NSNumber numberWithBool:entry_0.nullableStruct.Value().b]; - newElement_0.nullableStruct.c = - [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableStruct.Value().c)]; - newElement_0.nullableStruct.d = [NSData dataWithBytes:entry_0.nullableStruct.Value().d.data() - length:entry_0.nullableStruct.Value().d.size()]; - newElement_0.nullableStruct.e = [[NSString alloc] initWithBytes:entry_0.nullableStruct.Value().e.data() - length:entry_0.nullableStruct.Value().e.size() - encoding:NSUTF8StringEncoding]; - newElement_0.nullableStruct.f = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().f.Raw()]; - newElement_0.nullableStruct.g = [NSNumber numberWithFloat:entry_0.nullableStruct.Value().g]; - newElement_0.nullableStruct.h = [NSNumber numberWithDouble:entry_0.nullableStruct.Value().h]; - } - if (entry_0.optionalStruct.HasValue()) { - newElement_0.optionalStruct = [CHIPTestClusterClusterSimpleStruct new]; - newElement_0.optionalStruct.a = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().a]; - newElement_0.optionalStruct.b = [NSNumber numberWithBool:entry_0.optionalStruct.Value().b]; - newElement_0.optionalStruct.c = - [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.optionalStruct.Value().c)]; - newElement_0.optionalStruct.d = [NSData dataWithBytes:entry_0.optionalStruct.Value().d.data() - length:entry_0.optionalStruct.Value().d.size()]; - newElement_0.optionalStruct.e = [[NSString alloc] initWithBytes:entry_0.optionalStruct.Value().e.data() - length:entry_0.optionalStruct.Value().e.size() - encoding:NSUTF8StringEncoding]; - newElement_0.optionalStruct.f = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().f.Raw()]; - newElement_0.optionalStruct.g = [NSNumber numberWithFloat:entry_0.optionalStruct.Value().g]; - newElement_0.optionalStruct.h = [NSNumber numberWithDouble:entry_0.optionalStruct.Value().h]; - } else { - newElement_0.optionalStruct = nil; - } - if (entry_0.nullableOptionalStruct.HasValue()) { - if (entry_0.nullableOptionalStruct.Value().IsNull()) { - newElement_0.nullableOptionalStruct = nil; - } else { - newElement_0.nullableOptionalStruct = [CHIPTestClusterClusterSimpleStruct new]; - newElement_0.nullableOptionalStruct.a = - [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().a]; - newElement_0.nullableOptionalStruct.b = - [NSNumber numberWithBool:entry_0.nullableOptionalStruct.Value().Value().b]; - newElement_0.nullableOptionalStruct.c = [NSNumber - numberWithUnsignedChar:chip::to_underlying(entry_0.nullableOptionalStruct.Value().Value().c)]; - newElement_0.nullableOptionalStruct.d = - [NSData dataWithBytes:entry_0.nullableOptionalStruct.Value().Value().d.data() - length:entry_0.nullableOptionalStruct.Value().Value().d.size()]; - newElement_0.nullableOptionalStruct.e = - [[NSString alloc] initWithBytes:entry_0.nullableOptionalStruct.Value().Value().e.data() - length:entry_0.nullableOptionalStruct.Value().Value().e.size() - encoding:NSUTF8StringEncoding]; - newElement_0.nullableOptionalStruct.f = - [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().f.Raw()]; - newElement_0.nullableOptionalStruct.g = - [NSNumber numberWithFloat:entry_0.nullableOptionalStruct.Value().Value().g]; - newElement_0.nullableOptionalStruct.h = - [NSNumber numberWithDouble:entry_0.nullableOptionalStruct.Value().Value().h]; - } - } else { - newElement_0.nullableOptionalStruct = nil; - } - if (entry_0.nullableList.IsNull()) { - newElement_0.nullableList = nil; - } else { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_0.nullableList.Value().begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - NSNumber * newElement_3; - newElement_3 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3)]; - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.nullableList = array_3; - } - } - if (entry_0.optionalList.HasValue()) { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_0.optionalList.Value().begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - NSNumber * newElement_3; - newElement_3 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3)]; - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.optionalList = array_3; - } - } else { - newElement_0.optionalList = nil; - } - if (entry_0.nullableOptionalList.HasValue()) { - if (entry_0.nullableOptionalList.Value().IsNull()) { - newElement_0.nullableOptionalList = nil; - } else { - { // Scope for our temporary variables - auto * array_4 = [NSMutableArray new]; - auto iter_4 = entry_0.nullableOptionalList.Value().Value().begin(); - while (iter_4.Next()) { - auto & entry_4 = iter_4.GetValue(); - NSNumber * newElement_4; - newElement_4 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_4)]; - [array_4 addObject:newElement_4]; - } - CHIP_ERROR err = iter_4.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.nullableOptionalList = array_4; - } - } - } else { - newElement_0.nullableOptionalList = nil; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10863,265 +10175,3845 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::EnumAttr::Id: { - using TypeInfo = Attributes::EnumAttr::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::StructAttr::Id: { - using TypeInfo = Attributes::StructAttr::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - CHIPTestClusterClusterSimpleStruct * _Nonnull value; - value = [CHIPTestClusterClusterSimpleStruct new]; - value.a = [NSNumber numberWithUnsignedChar:cppValue.a]; - value.b = [NSNumber numberWithBool:cppValue.b]; - value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.c)]; - value.d = [NSData dataWithBytes:cppValue.d.data() length:cppValue.d.size()]; - value.e = [[NSString alloc] initWithBytes:cppValue.e.data() length:cppValue.e.size() encoding:NSUTF8StringEncoding]; - value.f = [NSNumber numberWithUnsignedChar:cppValue.f.Raw()]; - value.g = [NSNumber numberWithFloat:cppValue.g]; - value.h = [NSNumber numberWithDouble:cppValue.h]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::OperationalCredentials::Id: { + using namespace Clusters::OperationalCredentials; + switch (aPath.mAttributeId) { + case Attributes::NOCs::Id: { + using TypeInfo = Attributes::NOCs::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPOperationalCredentialsClusterNOCStruct * newElement_0; + newElement_0 = [CHIPOperationalCredentialsClusterNOCStruct new]; + newElement_0.noc = [NSData dataWithBytes:entry_0.noc.data() length:entry_0.noc.size()]; + if (entry_0.icac.IsNull()) { + newElement_0.icac = nil; + } else { + newElement_0.icac = [NSData dataWithBytes:entry_0.icac.Value().data() length:entry_0.icac.Value().size()]; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::Fabrics::Id: { + using TypeInfo = Attributes::Fabrics::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPOperationalCredentialsClusterFabricDescriptor * newElement_0; + newElement_0 = [CHIPOperationalCredentialsClusterFabricDescriptor new]; + newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() + length:entry_0.rootPublicKey.size()]; + newElement_0.vendorId = [NSNumber numberWithUnsignedShort:entry_0.vendorId]; + newElement_0.fabricId = [NSNumber numberWithUnsignedLongLong:entry_0.fabricId]; + newElement_0.nodeId = [NSNumber numberWithUnsignedLongLong:entry_0.nodeId]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::SupportedFabrics::Id: { + using TypeInfo = Attributes::SupportedFabrics::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::CommissionedFabrics::Id: { + using TypeInfo = Attributes::CommissionedFabrics::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::TrustedRootCertificates::Id: { + using TypeInfo = Attributes::TrustedRootCertificates::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSData * newElement_0; + newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::CurrentFabricIndex::Id: { + using TypeInfo = Attributes::CurrentFabricIndex::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::PowerSource::Id: { + using namespace Clusters::PowerSource; + switch (aPath.mAttributeId) { + case Attributes::Status::Id: { + using TypeInfo = Attributes::Status::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::Order::Id: { + using TypeInfo = Attributes::Order::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::WiredAssessedInputVoltage::Id: { + using TypeInfo = Attributes::WiredAssessedInputVoltage::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::WiredAssessedInputFrequency::Id: { + using TypeInfo = Attributes::WiredAssessedInputFrequency::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::WiredCurrentType::Id: { + using TypeInfo = Attributes::WiredCurrentType::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::WiredAssessedCurrent::Id: { + using TypeInfo = Attributes::WiredAssessedCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::WiredNominalVoltage::Id: { + using TypeInfo = Attributes::WiredNominalVoltage::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::WiredMaximumCurrent::Id: { + using TypeInfo = Attributes::WiredMaximumCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::WiredPresent::Id: { + using TypeInfo = Attributes::WiredPresent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::ActiveWiredFaults::Id: { + using TypeInfo = Attributes::ActiveWiredFaults::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::BatteryVoltage::Id: { + using TypeInfo = Attributes::BatteryVoltage::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::BatteryPercentRemaining::Id: { + using TypeInfo = Attributes::BatteryPercentRemaining::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::BatteryTimeRemaining::Id: { + using TypeInfo = Attributes::BatteryTimeRemaining::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::BatteryChargeLevel::Id: { + using TypeInfo = Attributes::BatteryChargeLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::BatteryReplacementNeeded::Id: { + using TypeInfo = Attributes::BatteryReplacementNeeded::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::BatteryReplaceability::Id: { + using TypeInfo = Attributes::BatteryReplaceability::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::BatteryPresent::Id: { + using TypeInfo = Attributes::BatteryPresent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::ActiveBatteryFaults::Id: { + using TypeInfo = Attributes::ActiveBatteryFaults::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::BatteryReplacementDescription::Id: { + using TypeInfo = Attributes::BatteryReplacementDescription::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::BatteryCommonDesignation::Id: { + using TypeInfo = Attributes::BatteryCommonDesignation::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::BatteryANSIDesignation::Id: { + using TypeInfo = Attributes::BatteryANSIDesignation::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::BatteryIECDesignation::Id: { + using TypeInfo = Attributes::BatteryIECDesignation::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::BatteryApprovedChemistry::Id: { + using TypeInfo = Attributes::BatteryApprovedChemistry::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::BatteryCapacity::Id: { + using TypeInfo = Attributes::BatteryCapacity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::BatteryQuantity::Id: { + using TypeInfo = Attributes::BatteryQuantity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::BatteryChargeState::Id: { + using TypeInfo = Attributes::BatteryChargeState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::BatteryTimeToFullCharge::Id: { + using TypeInfo = Attributes::BatteryTimeToFullCharge::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::BatteryFunctionalWhileCharging::Id: { + using TypeInfo = Attributes::BatteryFunctionalWhileCharging::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::BatteryChargingCurrent::Id: { + using TypeInfo = Attributes::BatteryChargingCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ActiveBatteryChargeFaults::Id: { + using TypeInfo = Attributes::ActiveBatteryChargeFaults::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::PowerSourceConfiguration::Id: { + using namespace Clusters::PowerSourceConfiguration; + switch (aPath.mAttributeId) { + case Attributes::Sources::Id: { + using TypeInfo = Attributes::Sources::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::PressureMeasurement::Id: { + using namespace Clusters::PressureMeasurement; + switch (aPath.mAttributeId) { + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::ScaledValue::Id: { + using TypeInfo = Attributes::ScaledValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MinScaledValue::Id: { + using TypeInfo = Attributes::MinScaledValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxScaledValue::Id: { + using TypeInfo = Attributes::MaxScaledValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::ScaledTolerance::Id: { + using TypeInfo = Attributes::ScaledTolerance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::Scale::Id: { + using TypeInfo = Attributes::Scale::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::PumpConfigurationAndControl::Id: { + using namespace Clusters::PumpConfigurationAndControl; + switch (aPath.mAttributeId) { + case Attributes::MaxPressure::Id: { + using TypeInfo = Attributes::MaxPressure::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxSpeed::Id: { + using TypeInfo = Attributes::MaxSpeed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxFlow::Id: { + using TypeInfo = Attributes::MaxFlow::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::MinConstPressure::Id: { + using TypeInfo = Attributes::MinConstPressure::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxConstPressure::Id: { + using TypeInfo = Attributes::MaxConstPressure::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MinCompPressure::Id: { + using TypeInfo = Attributes::MinCompPressure::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxCompPressure::Id: { + using TypeInfo = Attributes::MaxCompPressure::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MinConstSpeed::Id: { + using TypeInfo = Attributes::MinConstSpeed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxConstSpeed::Id: { + using TypeInfo = Attributes::MaxConstSpeed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::MinConstFlow::Id: { + using TypeInfo = Attributes::MinConstFlow::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxConstFlow::Id: { + using TypeInfo = Attributes::MaxConstFlow::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::MinConstTemp::Id: { + using TypeInfo = Attributes::MinConstTemp::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxConstTemp::Id: { + using TypeInfo = Attributes::MaxConstTemp::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::PumpStatus::Id: { + using TypeInfo = Attributes::PumpStatus::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::EffectiveOperationMode::Id: { + using TypeInfo = Attributes::EffectiveOperationMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::EffectiveControlMode::Id: { + using TypeInfo = Attributes::EffectiveControlMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::Capacity::Id: { + using TypeInfo = Attributes::Capacity::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::Speed::Id: { + using TypeInfo = Attributes::Speed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::LifetimeRunningHours::Id: { + using TypeInfo = Attributes::LifetimeRunningHours::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::Power::Id: { + using TypeInfo = Attributes::Power::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::LifetimeEnergyConsumed::Id: { + using TypeInfo = Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::OperationMode::Id: { + using TypeInfo = Attributes::OperationMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::ControlMode::Id: { + using TypeInfo = Attributes::ControlMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::AlarmMask::Id: { + using TypeInfo = Attributes::AlarmMask::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::RelativeHumidityMeasurement::Id: { + using namespace Clusters::RelativeHumidityMeasurement; + switch (aPath.mAttributeId) { + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::Scenes::Id: { + using namespace Clusters::Scenes; + switch (aPath.mAttributeId) { + case Attributes::SceneCount::Id: { + using TypeInfo = Attributes::SceneCount::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::CurrentScene::Id: { + using TypeInfo = Attributes::CurrentScene::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::CurrentGroup::Id: { + using TypeInfo = Attributes::CurrentGroup::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::SceneValid::Id: { + using TypeInfo = Attributes::SceneValid::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::NameSupport::Id: { + using TypeInfo = Attributes::NameSupport::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::LastConfiguredBy::Id: { + using TypeInfo = Attributes::LastConfiguredBy::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::SoftwareDiagnostics::Id: { + using namespace Clusters::SoftwareDiagnostics; + switch (aPath.mAttributeId) { + case Attributes::ThreadMetrics::Id: { + using TypeInfo = Attributes::ThreadMetrics::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPSoftwareDiagnosticsClusterThreadMetrics * newElement_0; + newElement_0 = [CHIPSoftwareDiagnosticsClusterThreadMetrics new]; + newElement_0.id = [NSNumber numberWithUnsignedLongLong:entry_0.id]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.stackFreeCurrent = [NSNumber numberWithUnsignedInt:entry_0.stackFreeCurrent]; + newElement_0.stackFreeMinimum = [NSNumber numberWithUnsignedInt:entry_0.stackFreeMinimum]; + newElement_0.stackSize = [NSNumber numberWithUnsignedInt:entry_0.stackSize]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::CurrentHeapFree::Id: { + using TypeInfo = Attributes::CurrentHeapFree::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::CurrentHeapUsed::Id: { + using TypeInfo = Attributes::CurrentHeapUsed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::CurrentHeapHighWatermark::Id: { + using TypeInfo = Attributes::CurrentHeapHighWatermark::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::Switch::Id: { + using namespace Clusters::Switch; + switch (aPath.mAttributeId) { + case Attributes::NumberOfPositions::Id: { + using TypeInfo = Attributes::NumberOfPositions::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::CurrentPosition::Id: { + using TypeInfo = Attributes::CurrentPosition::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::MultiPressMax::Id: { + using TypeInfo = Attributes::MultiPressMax::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::TargetNavigator::Id: { + using namespace Clusters::TargetNavigator; + switch (aPath.mAttributeId) { + case Attributes::TargetList::Id: { + using TypeInfo = Attributes::TargetList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPTargetNavigatorClusterTargetInfo * newElement_0; + newElement_0 = [CHIPTargetNavigatorClusterTargetInfo new]; + newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::CurrentTarget::Id: { + using TypeInfo = Attributes::CurrentTarget::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::TemperatureMeasurement::Id: { + using namespace Clusters::TemperatureMeasurement; + switch (aPath.mAttributeId) { + case Attributes::MeasuredValue::Id: { + using TypeInfo = Attributes::MeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MinMeasuredValue::Id: { + using TypeInfo = Attributes::MinMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::MaxMeasuredValue::Id: { + using TypeInfo = Attributes::MaxMeasuredValue::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::Tolerance::Id: { + using TypeInfo = Attributes::Tolerance::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::TestCluster::Id: { + using namespace Clusters::TestCluster; + switch (aPath.mAttributeId) { + case Attributes::Boolean::Id: { + using TypeInfo = Attributes::Boolean::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::Bitmap8::Id: { + using TypeInfo = Attributes::Bitmap8::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::Bitmap16::Id: { + using TypeInfo = Attributes::Bitmap16::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + return value; + } + case Attributes::Bitmap32::Id: { + using TypeInfo = Attributes::Bitmap32::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + return value; + } + case Attributes::Bitmap64::Id: { + using TypeInfo = Attributes::Bitmap64::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue.Raw()]; + return value; + } + case Attributes::Int8u::Id: { + using TypeInfo = Attributes::Int8u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::Int16u::Id: { + using TypeInfo = Attributes::Int16u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::Int24u::Id: { + using TypeInfo = Attributes::Int24u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::Int32u::Id: { + using TypeInfo = Attributes::Int32u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::Int40u::Id: { + using TypeInfo = Attributes::Int40u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::Int48u::Id: { + using TypeInfo = Attributes::Int48u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::Int56u::Id: { + using TypeInfo = Attributes::Int56u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::Int64u::Id: { + using TypeInfo = Attributes::Int64u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::Int8s::Id: { + using TypeInfo = Attributes::Int8s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; + return value; + } + case Attributes::Int16s::Id: { + using TypeInfo = Attributes::Int16s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; + return value; + } + case Attributes::Int24s::Id: { + using TypeInfo = Attributes::Int24s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithInt:cppValue]; + return value; + } + case Attributes::Int32s::Id: { + using TypeInfo = Attributes::Int32s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithInt:cppValue]; + return value; + } + case Attributes::Int40s::Id: { + using TypeInfo = Attributes::Int40s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::Int48s::Id: { + using TypeInfo = Attributes::Int48s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::Int56s::Id: { + using TypeInfo = Attributes::Int56s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::Int64s::Id: { + using TypeInfo = Attributes::Int64s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithLongLong:cppValue]; + return value; + } + case Attributes::Enum8::Id: { + using TypeInfo = Attributes::Enum8::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::Enum16::Id: { + using TypeInfo = Attributes::Enum16::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::FloatSingle::Id: { + using TypeInfo = Attributes::FloatSingle::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithFloat:cppValue]; + return value; + } + case Attributes::FloatDouble::Id: { + using TypeInfo = Attributes::FloatDouble::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithDouble:cppValue]; + return value; + } + case Attributes::OctetString::Id: { + using TypeInfo = Attributes::OctetString::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSData * _Nonnull value; + value = [NSData dataWithBytes:cppValue.data() length:cppValue.size()]; + return value; + } + case Attributes::ListInt8u::Id: { + using TypeInfo = Attributes::ListInt8u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::ListOctetString::Id: { + using TypeInfo = Attributes::ListOctetString::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSData * newElement_0; + newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::ListStructOctetString::Id: { + using TypeInfo = Attributes::ListStructOctetString::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPTestClusterClusterTestListStructOctet * newElement_0; + newElement_0 = [CHIPTestClusterClusterTestListStructOctet new]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedLongLong:entry_0.fabricIndex]; + newElement_0.operationalCert = [NSData dataWithBytes:entry_0.operationalCert.data() + length:entry_0.operationalCert.size()]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::LongOctetString::Id: { + using TypeInfo = Attributes::LongOctetString::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSData * _Nonnull value; + value = [NSData dataWithBytes:cppValue.data() length:cppValue.size()]; + return value; + } + case Attributes::CharString::Id: { + using TypeInfo = Attributes::CharString::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::LongCharString::Id: { + using TypeInfo = Attributes::LongCharString::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::EpochUs::Id: { + using TypeInfo = Attributes::EpochUs::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedLongLong:cppValue]; + return value; + } + case Attributes::EpochS::Id: { + using TypeInfo = Attributes::EpochS::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::VendorId::Id: { + using TypeInfo = Attributes::VendorId::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::ListNullablesAndOptionalsStruct::Id: { + using TypeInfo = Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPTestClusterClusterNullablesAndOptionalsStruct * newElement_0; + newElement_0 = [CHIPTestClusterClusterNullablesAndOptionalsStruct new]; + if (entry_0.nullableInt.IsNull()) { + newElement_0.nullableInt = nil; + } else { + newElement_0.nullableInt = [NSNumber numberWithUnsignedShort:entry_0.nullableInt.Value()]; + } + if (entry_0.optionalInt.HasValue()) { + newElement_0.optionalInt = [NSNumber numberWithUnsignedShort:entry_0.optionalInt.Value()]; + } else { + newElement_0.optionalInt = nil; + } + if (entry_0.nullableOptionalInt.HasValue()) { + if (entry_0.nullableOptionalInt.Value().IsNull()) { + newElement_0.nullableOptionalInt = nil; + } else { + newElement_0.nullableOptionalInt = + [NSNumber numberWithUnsignedShort:entry_0.nullableOptionalInt.Value().Value()]; + } + } else { + newElement_0.nullableOptionalInt = nil; + } + if (entry_0.nullableString.IsNull()) { + newElement_0.nullableString = nil; + } else { + newElement_0.nullableString = [[NSString alloc] initWithBytes:entry_0.nullableString.Value().data() + length:entry_0.nullableString.Value().size() + encoding:NSUTF8StringEncoding]; + } + if (entry_0.optionalString.HasValue()) { + newElement_0.optionalString = [[NSString alloc] initWithBytes:entry_0.optionalString.Value().data() + length:entry_0.optionalString.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.optionalString = nil; + } + if (entry_0.nullableOptionalString.HasValue()) { + if (entry_0.nullableOptionalString.Value().IsNull()) { + newElement_0.nullableOptionalString = nil; + } else { + newElement_0.nullableOptionalString = + [[NSString alloc] initWithBytes:entry_0.nullableOptionalString.Value().Value().data() + length:entry_0.nullableOptionalString.Value().Value().size() + encoding:NSUTF8StringEncoding]; + } + } else { + newElement_0.nullableOptionalString = nil; + } + if (entry_0.nullableStruct.IsNull()) { + newElement_0.nullableStruct = nil; + } else { + newElement_0.nullableStruct = [CHIPTestClusterClusterSimpleStruct new]; + newElement_0.nullableStruct.a = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().a]; + newElement_0.nullableStruct.b = [NSNumber numberWithBool:entry_0.nullableStruct.Value().b]; + newElement_0.nullableStruct.c = + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.nullableStruct.Value().c)]; + newElement_0.nullableStruct.d = [NSData dataWithBytes:entry_0.nullableStruct.Value().d.data() + length:entry_0.nullableStruct.Value().d.size()]; + newElement_0.nullableStruct.e = [[NSString alloc] initWithBytes:entry_0.nullableStruct.Value().e.data() + length:entry_0.nullableStruct.Value().e.size() + encoding:NSUTF8StringEncoding]; + newElement_0.nullableStruct.f = [NSNumber numberWithUnsignedChar:entry_0.nullableStruct.Value().f.Raw()]; + newElement_0.nullableStruct.g = [NSNumber numberWithFloat:entry_0.nullableStruct.Value().g]; + newElement_0.nullableStruct.h = [NSNumber numberWithDouble:entry_0.nullableStruct.Value().h]; + } + if (entry_0.optionalStruct.HasValue()) { + newElement_0.optionalStruct = [CHIPTestClusterClusterSimpleStruct new]; + newElement_0.optionalStruct.a = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().a]; + newElement_0.optionalStruct.b = [NSNumber numberWithBool:entry_0.optionalStruct.Value().b]; + newElement_0.optionalStruct.c = + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.optionalStruct.Value().c)]; + newElement_0.optionalStruct.d = [NSData dataWithBytes:entry_0.optionalStruct.Value().d.data() + length:entry_0.optionalStruct.Value().d.size()]; + newElement_0.optionalStruct.e = [[NSString alloc] initWithBytes:entry_0.optionalStruct.Value().e.data() + length:entry_0.optionalStruct.Value().e.size() + encoding:NSUTF8StringEncoding]; + newElement_0.optionalStruct.f = [NSNumber numberWithUnsignedChar:entry_0.optionalStruct.Value().f.Raw()]; + newElement_0.optionalStruct.g = [NSNumber numberWithFloat:entry_0.optionalStruct.Value().g]; + newElement_0.optionalStruct.h = [NSNumber numberWithDouble:entry_0.optionalStruct.Value().h]; + } else { + newElement_0.optionalStruct = nil; + } + if (entry_0.nullableOptionalStruct.HasValue()) { + if (entry_0.nullableOptionalStruct.Value().IsNull()) { + newElement_0.nullableOptionalStruct = nil; + } else { + newElement_0.nullableOptionalStruct = [CHIPTestClusterClusterSimpleStruct new]; + newElement_0.nullableOptionalStruct.a = + [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().a]; + newElement_0.nullableOptionalStruct.b = + [NSNumber numberWithBool:entry_0.nullableOptionalStruct.Value().Value().b]; + newElement_0.nullableOptionalStruct.c = [NSNumber + numberWithUnsignedChar:chip::to_underlying(entry_0.nullableOptionalStruct.Value().Value().c)]; + newElement_0.nullableOptionalStruct.d = + [NSData dataWithBytes:entry_0.nullableOptionalStruct.Value().Value().d.data() + length:entry_0.nullableOptionalStruct.Value().Value().d.size()]; + newElement_0.nullableOptionalStruct.e = + [[NSString alloc] initWithBytes:entry_0.nullableOptionalStruct.Value().Value().e.data() + length:entry_0.nullableOptionalStruct.Value().Value().e.size() + encoding:NSUTF8StringEncoding]; + newElement_0.nullableOptionalStruct.f = + [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalStruct.Value().Value().f.Raw()]; + newElement_0.nullableOptionalStruct.g = + [NSNumber numberWithFloat:entry_0.nullableOptionalStruct.Value().Value().g]; + newElement_0.nullableOptionalStruct.h = + [NSNumber numberWithDouble:entry_0.nullableOptionalStruct.Value().Value().h]; + } + } else { + newElement_0.nullableOptionalStruct = nil; + } + if (entry_0.nullableList.IsNull()) { + newElement_0.nullableList = nil; + } else { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.nullableList.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSNumber * newElement_3; + newElement_3 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3)]; + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.nullableList = array_3; + } + } + if (entry_0.optionalList.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.optionalList.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSNumber * newElement_3; + newElement_3 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3)]; + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.optionalList = array_3; + } + } else { + newElement_0.optionalList = nil; + } + if (entry_0.nullableOptionalList.HasValue()) { + if (entry_0.nullableOptionalList.Value().IsNull()) { + newElement_0.nullableOptionalList = nil; + } else { + { // Scope for our temporary variables + auto * array_4 = [NSMutableArray new]; + auto iter_4 = entry_0.nullableOptionalList.Value().Value().begin(); + while (iter_4.Next()) { + auto & entry_4 = iter_4.GetValue(); + NSNumber * newElement_4; + newElement_4 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_4)]; + [array_4 addObject:newElement_4]; + } + CHIP_ERROR err = iter_4.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.nullableOptionalList = array_4; + } + } + } else { + newElement_0.nullableOptionalList = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EnumAttr::Id: { + using TypeInfo = Attributes::EnumAttr::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::StructAttr::Id: { + using TypeInfo = Attributes::StructAttr::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + CHIPTestClusterClusterSimpleStruct * _Nonnull value; + value = [CHIPTestClusterClusterSimpleStruct new]; + value.a = [NSNumber numberWithUnsignedChar:cppValue.a]; + value.b = [NSNumber numberWithBool:cppValue.b]; + value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.c)]; + value.d = [NSData dataWithBytes:cppValue.d.data() length:cppValue.d.size()]; + value.e = [[NSString alloc] initWithBytes:cppValue.e.data() length:cppValue.e.size() encoding:NSUTF8StringEncoding]; + value.f = [NSNumber numberWithUnsignedChar:cppValue.f.Raw()]; + value.g = [NSNumber numberWithFloat:cppValue.g]; + value.h = [NSNumber numberWithDouble:cppValue.h]; + return value; + } + case Attributes::RangeRestrictedInt8u::Id: { + using TypeInfo = Attributes::RangeRestrictedInt8u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::RangeRestrictedInt8s::Id: { + using TypeInfo = Attributes::RangeRestrictedInt8s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; + return value; + } + case Attributes::RangeRestrictedInt16u::Id: { + using TypeInfo = Attributes::RangeRestrictedInt16u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::RangeRestrictedInt16s::Id: { + using TypeInfo = Attributes::RangeRestrictedInt16s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; + return value; + } + case Attributes::ListLongOctetString::Id: { + using TypeInfo = Attributes::ListLongOctetString::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSData * newElement_0; + newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::ListFabricScoped::Id: { + using TypeInfo = Attributes::ListFabricScoped::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPTestClusterClusterTestFabricScoped * newElement_0; + newElement_0 = [CHIPTestClusterClusterTestFabricScoped new]; + newElement_0.fabricSensitiveInt8u = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveInt8u]; + if (entry_0.optionalFabricSensitiveInt8u.HasValue()) { + newElement_0.optionalFabricSensitiveInt8u = + [NSNumber numberWithUnsignedChar:entry_0.optionalFabricSensitiveInt8u.Value()]; + } else { + newElement_0.optionalFabricSensitiveInt8u = nil; + } + if (entry_0.nullableFabricSensitiveInt8u.IsNull()) { + newElement_0.nullableFabricSensitiveInt8u = nil; + } else { + newElement_0.nullableFabricSensitiveInt8u = + [NSNumber numberWithUnsignedChar:entry_0.nullableFabricSensitiveInt8u.Value()]; + } + if (entry_0.nullableOptionalFabricSensitiveInt8u.HasValue()) { + if (entry_0.nullableOptionalFabricSensitiveInt8u.Value().IsNull()) { + newElement_0.nullableOptionalFabricSensitiveInt8u = nil; + } else { + newElement_0.nullableOptionalFabricSensitiveInt8u = + [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value()]; + } + } else { + newElement_0.nullableOptionalFabricSensitiveInt8u = nil; + } + newElement_0.fabricSensitiveCharString = + [[NSString alloc] initWithBytes:entry_0.fabricSensitiveCharString.data() + length:entry_0.fabricSensitiveCharString.size() + encoding:NSUTF8StringEncoding]; + newElement_0.fabricSensitiveStruct = [CHIPTestClusterClusterSimpleStruct new]; + newElement_0.fabricSensitiveStruct.a = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.a]; + newElement_0.fabricSensitiveStruct.b = [NSNumber numberWithBool:entry_0.fabricSensitiveStruct.b]; + newElement_0.fabricSensitiveStruct.c = + [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.fabricSensitiveStruct.c)]; + newElement_0.fabricSensitiveStruct.d = [NSData dataWithBytes:entry_0.fabricSensitiveStruct.d.data() + length:entry_0.fabricSensitiveStruct.d.size()]; + newElement_0.fabricSensitiveStruct.e = [[NSString alloc] initWithBytes:entry_0.fabricSensitiveStruct.e.data() + length:entry_0.fabricSensitiveStruct.e.size() + encoding:NSUTF8StringEncoding]; + newElement_0.fabricSensitiveStruct.f = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.f.Raw()]; + newElement_0.fabricSensitiveStruct.g = [NSNumber numberWithFloat:entry_0.fabricSensitiveStruct.g]; + newElement_0.fabricSensitiveStruct.h = [NSNumber numberWithDouble:entry_0.fabricSensitiveStruct.h]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.fabricSensitiveInt8uList.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedChar:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.fabricSensitiveInt8uList = array_2; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::TimedWriteBoolean::Id: { + using TypeInfo = Attributes::TimedWriteBoolean::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::GeneralErrorBoolean::Id: { + using TypeInfo = Attributes::GeneralErrorBoolean::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::ClusterErrorBoolean::Id: { + using TypeInfo = Attributes::ClusterErrorBoolean::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::Unsupported::Id: { + using TypeInfo = Attributes::Unsupported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithBool:cppValue]; + return value; + } + case Attributes::NullableBoolean::Id: { + using TypeInfo = Attributes::NullableBoolean::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithBool:cppValue.Value()]; + } + return value; + } + case Attributes::NullableBitmap8::Id: { + using TypeInfo = Attributes::NullableBitmap8::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value().Raw()]; + } + return value; + } + case Attributes::NullableBitmap16::Id: { + using TypeInfo = Attributes::NullableBitmap16::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value().Raw()]; + } + return value; + } + case Attributes::NullableBitmap32::Id: { + using TypeInfo = Attributes::NullableBitmap32::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value().Raw()]; + } + return value; + } + case Attributes::NullableBitmap64::Id: { + using TypeInfo = Attributes::NullableBitmap64::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value().Raw()]; + } + return value; + } + case Attributes::NullableInt8u::Id: { + using TypeInfo = Attributes::NullableInt8u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::NullableInt16u::Id: { + using TypeInfo = Attributes::NullableInt16u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::NullableInt24u::Id: { + using TypeInfo = Attributes::NullableInt24u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::NullableInt32u::Id: { + using TypeInfo = Attributes::NullableInt32u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::NullableInt40u::Id: { + using TypeInfo = Attributes::NullableInt40u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::NullableInt48u::Id: { + using TypeInfo = Attributes::NullableInt48u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::NullableInt56u::Id: { + using TypeInfo = Attributes::NullableInt56u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::NullableInt64u::Id: { + using TypeInfo = Attributes::NullableInt64u::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::NullableInt8s::Id: { + using TypeInfo = Attributes::NullableInt8s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithChar:cppValue.Value()]; + } + return value; + } + case Attributes::NullableInt16s::Id: { + using TypeInfo = Attributes::NullableInt16s::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithShort:cppValue.Value()]; + } return value; } - case Attributes::RangeRestrictedInt8u::Id: { - using TypeInfo = Attributes::RangeRestrictedInt8u::TypeInfo; + case Attributes::NullableInt24s::Id: { + using TypeInfo = Attributes::NullableInt24s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithInt:cppValue.Value()]; + } return value; } - case Attributes::RangeRestrictedInt8s::Id: { - using TypeInfo = Attributes::RangeRestrictedInt8s::TypeInfo; + case Attributes::NullableInt32s::Id: { + using TypeInfo = Attributes::NullableInt32s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithInt:cppValue.Value()]; + } return value; } - case Attributes::RangeRestrictedInt16u::Id: { - using TypeInfo = Attributes::RangeRestrictedInt16u::TypeInfo; + case Attributes::NullableInt40s::Id: { + using TypeInfo = Attributes::NullableInt40s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithLongLong:cppValue.Value()]; + } return value; } - case Attributes::RangeRestrictedInt16s::Id: { - using TypeInfo = Attributes::RangeRestrictedInt16s::TypeInfo; + case Attributes::NullableInt48s::Id: { + using TypeInfo = Attributes::NullableInt48s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithLongLong:cppValue.Value()]; + } return value; } - case Attributes::ListLongOctetString::Id: { - using TypeInfo = Attributes::ListLongOctetString::TypeInfo; + case Attributes::NullableInt56s::Id: { + using TypeInfo = Attributes::NullableInt56s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSData * newElement_0; - newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithLongLong:cppValue.Value()]; } return value; } - case Attributes::ListFabricScoped::Id: { - using TypeInfo = Attributes::ListFabricScoped::TypeInfo; + case Attributes::NullableInt64s::Id: { + using TypeInfo = Attributes::NullableInt64s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - CHIPTestClusterClusterTestFabricScoped * newElement_0; - newElement_0 = [CHIPTestClusterClusterTestFabricScoped new]; - newElement_0.fabricSensitiveInt8u = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveInt8u]; - if (entry_0.optionalFabricSensitiveInt8u.HasValue()) { - newElement_0.optionalFabricSensitiveInt8u = - [NSNumber numberWithUnsignedChar:entry_0.optionalFabricSensitiveInt8u.Value()]; - } else { - newElement_0.optionalFabricSensitiveInt8u = nil; - } - if (entry_0.nullableFabricSensitiveInt8u.IsNull()) { - newElement_0.nullableFabricSensitiveInt8u = nil; - } else { - newElement_0.nullableFabricSensitiveInt8u = - [NSNumber numberWithUnsignedChar:entry_0.nullableFabricSensitiveInt8u.Value()]; - } - if (entry_0.nullableOptionalFabricSensitiveInt8u.HasValue()) { - if (entry_0.nullableOptionalFabricSensitiveInt8u.Value().IsNull()) { - newElement_0.nullableOptionalFabricSensitiveInt8u = nil; - } else { - newElement_0.nullableOptionalFabricSensitiveInt8u = - [NSNumber numberWithUnsignedChar:entry_0.nullableOptionalFabricSensitiveInt8u.Value().Value()]; - } - } else { - newElement_0.nullableOptionalFabricSensitiveInt8u = nil; - } - newElement_0.fabricSensitiveCharString = - [[NSString alloc] initWithBytes:entry_0.fabricSensitiveCharString.data() - length:entry_0.fabricSensitiveCharString.size() - encoding:NSUTF8StringEncoding]; - newElement_0.fabricSensitiveStruct = [CHIPTestClusterClusterSimpleStruct new]; - newElement_0.fabricSensitiveStruct.a = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.a]; - newElement_0.fabricSensitiveStruct.b = [NSNumber numberWithBool:entry_0.fabricSensitiveStruct.b]; - newElement_0.fabricSensitiveStruct.c = - [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.fabricSensitiveStruct.c)]; - newElement_0.fabricSensitiveStruct.d = [NSData dataWithBytes:entry_0.fabricSensitiveStruct.d.data() - length:entry_0.fabricSensitiveStruct.d.size()]; - newElement_0.fabricSensitiveStruct.e = [[NSString alloc] initWithBytes:entry_0.fabricSensitiveStruct.e.data() - length:entry_0.fabricSensitiveStruct.e.size() - encoding:NSUTF8StringEncoding]; - newElement_0.fabricSensitiveStruct.f = [NSNumber numberWithUnsignedChar:entry_0.fabricSensitiveStruct.f.Raw()]; - newElement_0.fabricSensitiveStruct.g = [NSNumber numberWithFloat:entry_0.fabricSensitiveStruct.g]; - newElement_0.fabricSensitiveStruct.h = [NSNumber numberWithDouble:entry_0.fabricSensitiveStruct.h]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.fabricSensitiveInt8uList.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedChar:entry_2]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.fabricSensitiveInt8uList = array_2; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithLongLong:cppValue.Value()]; } return value; } - case Attributes::TimedWriteBoolean::Id: { - using TypeInfo = Attributes::TimedWriteBoolean::TypeInfo; + case Attributes::NullableEnum8::Id: { + using TypeInfo = Attributes::NullableEnum8::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } - case Attributes::GeneralErrorBoolean::Id: { - using TypeInfo = Attributes::GeneralErrorBoolean::TypeInfo; + case Attributes::NullableEnum16::Id: { + using TypeInfo = Attributes::NullableEnum16::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } return value; } - case Attributes::ClusterErrorBoolean::Id: { - using TypeInfo = Attributes::ClusterErrorBoolean::TypeInfo; + case Attributes::NullableFloatSingle::Id: { + using TypeInfo = Attributes::NullableFloatSingle::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithFloat:cppValue.Value()]; + } return value; } - case Attributes::Unsupported::Id: { - using TypeInfo = Attributes::Unsupported::TypeInfo; + case Attributes::NullableFloatDouble::Id: { + using TypeInfo = Attributes::NullableFloatDouble::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithDouble:cppValue.Value()]; + } return value; } - case Attributes::NullableBoolean::Id: { - using TypeInfo = Attributes::NullableBoolean::TypeInfo; + case Attributes::NullableOctetString::Id: { + using TypeInfo = Attributes::NullableOctetString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; + NSData * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithBool:cppValue.Value()]; + value = [NSData dataWithBytes:cppValue.Value().data() length:cppValue.Value().size()]; } return value; } - case Attributes::NullableBitmap8::Id: { - using TypeInfo = Attributes::NullableBitmap8::TypeInfo; + case Attributes::NullableCharString::Id: { + using TypeInfo = Attributes::NullableCharString::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; + NSString * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value().Raw()]; + value = [[NSString alloc] initWithBytes:cppValue.Value().data() + length:cppValue.Value().size() + encoding:NSUTF8StringEncoding]; } return value; } - case Attributes::NullableBitmap16::Id: { - using TypeInfo = Attributes::NullableBitmap16::TypeInfo; + case Attributes::NullableEnumAttr::Id: { + using TypeInfo = Attributes::NullableEnumAttr::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11131,27 +14023,37 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value().Raw()]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; } return value; } - case Attributes::NullableBitmap32::Id: { - using TypeInfo = Attributes::NullableBitmap32::TypeInfo; + case Attributes::NullableStruct::Id: { + using TypeInfo = Attributes::NullableStruct::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; + CHIPTestClusterClusterSimpleStruct * _Nullable value; if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value().Raw()]; + value = [CHIPTestClusterClusterSimpleStruct new]; + value.a = [NSNumber numberWithUnsignedChar:cppValue.Value().a]; + value.b = [NSNumber numberWithBool:cppValue.Value().b]; + value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().c)]; + value.d = [NSData dataWithBytes:cppValue.Value().d.data() length:cppValue.Value().d.size()]; + value.e = [[NSString alloc] initWithBytes:cppValue.Value().e.data() + length:cppValue.Value().e.size() + encoding:NSUTF8StringEncoding]; + value.f = [NSNumber numberWithUnsignedChar:cppValue.Value().f.Raw()]; + value.g = [NSNumber numberWithFloat:cppValue.Value().g]; + value.h = [NSNumber numberWithDouble:cppValue.Value().h]; } return value; } - case Attributes::NullableBitmap64::Id: { - using TypeInfo = Attributes::NullableBitmap64::TypeInfo; + case Attributes::NullableRangeRestrictedInt8u::Id: { + using TypeInfo = Attributes::NullableRangeRestrictedInt8u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11161,12 +14063,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value().Raw()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; } return value; } - case Attributes::NullableInt8u::Id: { - using TypeInfo = Attributes::NullableInt8u::TypeInfo; + case Attributes::NullableRangeRestrictedInt8s::Id: { + using TypeInfo = Attributes::NullableRangeRestrictedInt8s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11176,12 +14078,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + value = [NSNumber numberWithChar:cppValue.Value()]; } return value; } - case Attributes::NullableInt16u::Id: { - using TypeInfo = Attributes::NullableInt16u::TypeInfo; + case Attributes::NullableRangeRestrictedInt16u::Id: { + using TypeInfo = Attributes::NullableRangeRestrictedInt16u::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11195,8 +14097,8 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } - case Attributes::NullableInt24u::Id: { - using TypeInfo = Attributes::NullableInt24u::TypeInfo; + case Attributes::NullableRangeRestrictedInt16s::Id: { + using TypeInfo = Attributes::NullableRangeRestrictedInt16s::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11206,552 +14108,484 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + value = [NSNumber numberWithShort:cppValue.Value()]; } return value; } - case Attributes::NullableInt32u::Id: { - using TypeInfo = Attributes::NullableInt32u::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::NullableInt40u::Id: { - using TypeInfo = Attributes::NullableInt40u::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::NullableInt48u::Id: { - using TypeInfo = Attributes::NullableInt48u::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; } return value; } - case Attributes::NullableInt56u::Id: { - using TypeInfo = Attributes::NullableInt56u::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::NullableInt64u::Id: { - using TypeInfo = Attributes::NullableInt64u::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::NullableInt8s::Id: { - using TypeInfo = Attributes::NullableInt8s::TypeInfo; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; + break; + } + break; + } + case Clusters::Thermostat::Id: { + using namespace Clusters::Thermostat; + switch (aPath.mAttributeId) { + case Attributes::LocalTemperature::Id: { + using TypeInfo = Attributes::LocalTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableInt16s::Id: { - using TypeInfo = Attributes::NullableInt16s::TypeInfo; + case Attributes::OutdoorTemperature::Id: { + using TypeInfo = Attributes::OutdoorTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableInt24s::Id: { - using TypeInfo = Attributes::NullableInt24s::TypeInfo; + case Attributes::Occupancy::Id: { + using TypeInfo = Attributes::Occupancy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithInt:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::NullableInt32s::Id: { - using TypeInfo = Attributes::NullableInt32s::TypeInfo; + case Attributes::AbsMinHeatSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithInt:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableInt40s::Id: { - using TypeInfo = Attributes::NullableInt40s::TypeInfo; + case Attributes::AbsMaxHeatSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMaxHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithLongLong:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableInt48s::Id: { - using TypeInfo = Attributes::NullableInt48s::TypeInfo; + case Attributes::AbsMinCoolSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMinCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithLongLong:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; + return value; + } + case Attributes::AbsMaxCoolSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableInt56s::Id: { - using TypeInfo = Attributes::NullableInt56s::TypeInfo; + case Attributes::PiCoolingDemand::Id: { + using TypeInfo = Attributes::PiCoolingDemand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithLongLong:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::PiHeatingDemand::Id: { + using TypeInfo = Attributes::PiHeatingDemand::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::NullableInt64s::Id: { - using TypeInfo = Attributes::NullableInt64s::TypeInfo; + case Attributes::HvacSystemTypeConfiguration::Id: { + using TypeInfo = Attributes::HvacSystemTypeConfiguration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithLongLong:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::LocalTemperatureCalibration::Id: { + using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; return value; } - case Attributes::NullableEnum8::Id: { - using TypeInfo = Attributes::NullableEnum8::TypeInfo; + case Attributes::OccupiedCoolingSetpoint::Id: { + using TypeInfo = Attributes::OccupiedCoolingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; + return value; + } + case Attributes::OccupiedHeatingSetpoint::Id: { + using TypeInfo = Attributes::OccupiedHeatingSetpoint::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableEnum16::Id: { - using TypeInfo = Attributes::NullableEnum16::TypeInfo; + case Attributes::UnoccupiedCoolingSetpoint::Id: { + using TypeInfo = Attributes::UnoccupiedCoolingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableFloatSingle::Id: { - using TypeInfo = Attributes::NullableFloatSingle::TypeInfo; + case Attributes::UnoccupiedHeatingSetpoint::Id: { + using TypeInfo = Attributes::UnoccupiedHeatingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithFloat:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableFloatDouble::Id: { - using TypeInfo = Attributes::NullableFloatDouble::TypeInfo; + case Attributes::MinHeatSetpointLimit::Id: { + using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithDouble:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableOctetString::Id: { - using TypeInfo = Attributes::NullableOctetString::TypeInfo; + case Attributes::MaxHeatSetpointLimit::Id: { + using TypeInfo = Attributes::MaxHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSData * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSData dataWithBytes:cppValue.Value().data() length:cppValue.Value().size()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableCharString::Id: { - using TypeInfo = Attributes::NullableCharString::TypeInfo; + case Attributes::MinCoolSetpointLimit::Id: { + using TypeInfo = Attributes::MinCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [[NSString alloc] initWithBytes:cppValue.Value().data() - length:cppValue.Value().size() - encoding:NSUTF8StringEncoding]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableEnumAttr::Id: { - using TypeInfo = Attributes::NullableEnumAttr::TypeInfo; + case Attributes::MaxCoolSetpointLimit::Id: { + using TypeInfo = Attributes::MaxCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::NullableStruct::Id: { - using TypeInfo = Attributes::NullableStruct::TypeInfo; + case Attributes::MinSetpointDeadBand::Id: { + using TypeInfo = Attributes::MinSetpointDeadBand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - CHIPTestClusterClusterSimpleStruct * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [CHIPTestClusterClusterSimpleStruct new]; - value.a = [NSNumber numberWithUnsignedChar:cppValue.Value().a]; - value.b = [NSNumber numberWithBool:cppValue.Value().b]; - value.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().c)]; - value.d = [NSData dataWithBytes:cppValue.Value().d.data() length:cppValue.Value().d.size()]; - value.e = [[NSString alloc] initWithBytes:cppValue.Value().e.data() - length:cppValue.Value().e.size() - encoding:NSUTF8StringEncoding]; - value.f = [NSNumber numberWithUnsignedChar:cppValue.Value().f.Raw()]; - value.g = [NSNumber numberWithFloat:cppValue.Value().g]; - value.h = [NSNumber numberWithDouble:cppValue.Value().h]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; return value; } - case Attributes::NullableRangeRestrictedInt8u::Id: { - using TypeInfo = Attributes::NullableRangeRestrictedInt8u::TypeInfo; + case Attributes::RemoteSensing::Id: { + using TypeInfo = Attributes::RemoteSensing::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::NullableRangeRestrictedInt8s::Id: { - using TypeInfo = Attributes::NullableRangeRestrictedInt8s::TypeInfo; + case Attributes::ControlSequenceOfOperation::Id: { + using TypeInfo = Attributes::ControlSequenceOfOperation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::NullableRangeRestrictedInt16u::Id: { - using TypeInfo = Attributes::NullableRangeRestrictedInt16u::TypeInfo; + case Attributes::SystemMode::Id: { + using TypeInfo = Attributes::SystemMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::NullableRangeRestrictedInt16s::Id: { - using TypeInfo = Attributes::NullableRangeRestrictedInt16s::TypeInfo; + case Attributes::AlarmMask::Id: { + using TypeInfo = Attributes::AlarmMask::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithShort:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ThermostatRunningMode::Id: { + using TypeInfo = Attributes::ThermostatRunningMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::StartOfWeek::Id: { + using TypeInfo = Attributes::StartOfWeek::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::NumberOfWeeklyTransitions::Id: { + using TypeInfo = Attributes::NumberOfWeeklyTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::NumberOfDailyTransitions::Id: { + using TypeInfo = Attributes::NumberOfDailyTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH; - break; - } - break; - } - case Clusters::Thermostat::Id: { - using namespace Clusters::Thermostat; - switch (aPath.mAttributeId) { - case Attributes::LocalTemperature::Id: { - using TypeInfo = Attributes::LocalTemperature::TypeInfo; + case Attributes::TemperatureSetpointHold::Id: { + using TypeInfo = Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AbsMinHeatSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMinHeatSetpointLimit::TypeInfo; + case Attributes::TemperatureSetpointHoldDuration::Id: { + using TypeInfo = Attributes::TemperatureSetpointHoldDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AbsMaxHeatSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + case Attributes::ThermostatProgrammingOperationMode::Id: { + using TypeInfo = Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::AbsMinCoolSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMinCoolSetpointLimit::TypeInfo; + case Attributes::ThermostatRunningState::Id: { + using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AbsMaxCoolSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + case Attributes::SetpointChangeSource::Id: { + using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::OccupiedCoolingSetpoint::Id: { - using TypeInfo = Attributes::OccupiedCoolingSetpoint::TypeInfo; + case Attributes::SetpointChangeAmount::Id: { + using TypeInfo = Attributes::SetpointChangeAmount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11761,96 +14595,96 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::OccupiedHeatingSetpoint::Id: { - using TypeInfo = Attributes::OccupiedHeatingSetpoint::TypeInfo; + case Attributes::SetpointChangeSourceTimestamp::Id: { + using TypeInfo = Attributes::SetpointChangeSourceTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::MinHeatSetpointLimit::Id: { - using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; + case Attributes::AcType::Id: { + using TypeInfo = Attributes::AcType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MaxHeatSetpointLimit::Id: { - using TypeInfo = Attributes::MaxHeatSetpointLimit::TypeInfo; + case Attributes::AcCapacity::Id: { + using TypeInfo = Attributes::AcCapacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::MinCoolSetpointLimit::Id: { - using TypeInfo = Attributes::MinCoolSetpointLimit::TypeInfo; + case Attributes::AcRefrigerantType::Id: { + using TypeInfo = Attributes::AcRefrigerantType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MaxCoolSetpointLimit::Id: { - using TypeInfo = Attributes::MaxCoolSetpointLimit::TypeInfo; + case Attributes::AcCompressorType::Id: { + using TypeInfo = Attributes::AcCompressorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::MinSetpointDeadBand::Id: { - using TypeInfo = Attributes::MinSetpointDeadBand::TypeInfo; + case Attributes::AcErrorCode::Id: { + using TypeInfo = Attributes::AcErrorCode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::ControlSequenceOfOperation::Id: { - using TypeInfo = Attributes::ControlSequenceOfOperation::TypeInfo; + case Attributes::AcLouverPosition::Id: { + using TypeInfo = Attributes::AcLouverPosition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::SystemMode::Id: { - using TypeInfo = Attributes::SystemMode::TypeInfo; + case Attributes::AcCoilTemperature::Id: { + using TypeInfo = Attributes::AcCoilTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithShort:cppValue]; return value; } - case Attributes::StartOfWeek::Id: { - using TypeInfo = Attributes::StartOfWeek::TypeInfo; + case Attributes::AcCapacityFormat::Id: { + using TypeInfo = Attributes::AcCapacityFormat::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11860,26 +14694,56 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::NumberOfWeeklyTransitions::Id: { - using TypeInfo = Attributes::NumberOfWeeklyTransitions::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::NumberOfDailyTransitions::Id: { - using TypeInfo = Attributes::NumberOfDailyTransitions::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } case Attributes::AttributeList::Id: { @@ -12050,6 +14914,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13085,6 +15960,43 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13116,6 +16028,58 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13257,6 +16221,43 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13366,6 +16367,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13669,6 +16681,28 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } + case Attributes::PhysicalClosedLimitLift::Id: { + using TypeInfo = Attributes::PhysicalClosedLimitLift::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::PhysicalClosedLimitTilt::Id: { + using TypeInfo = Attributes::PhysicalClosedLimitTilt::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } case Attributes::CurrentPositionLift::Id: { using TypeInfo = Attributes::CurrentPositionLift::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13699,6 +16733,28 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader } return value; } + case Attributes::NumberOfActuationsLift::Id: { + using TypeInfo = Attributes::NumberOfActuationsLift::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::NumberOfActuationsTilt::Id: { + using TypeInfo = Attributes::NumberOfActuationsTilt::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } case Attributes::ConfigStatus::Id: { using TypeInfo = Attributes::ConfigStatus::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 12025fbd91a5e1..ef6d64a413cfc4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -3718,6 +3718,30 @@ } } +void CHIPDoorLockCredentialRulesSupportAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPDoorLockSupportedOperatingModesAttributeCallbackBridge::OnSuccessFn( void * context, chip::BitFlags value) { @@ -3742,6 +3766,246 @@ } } +void CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPDoorLockAlarmMaskAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockAlarmMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPDoorLockKeypadOperationEventMaskAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockKeypadOperationEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPDoorLockRemoteOperationEventMaskAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockRemoteOperationEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPDoorLockManualOperationEventMaskAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockManualOperationEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPDoorLockRFIDOperationEventMaskAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockRFIDOperationEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -5889,6 +6153,45 @@ } } +void CHIPLocalizationConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPLowPowerGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -6602,6 +6905,125 @@ } } +void CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( + void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( + void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -6685,6 +7107,86 @@ } } +void CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( + void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( + void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -7722,6 +8224,84 @@ } } +void CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPPressureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -8559,6 +9139,85 @@ } } +void CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( + void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -9461,6 +10120,84 @@ } } +void CHIPThermostatGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPThermostatAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPThermostatAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -10103,7 +10840,7 @@ } } -void CHIPUnitLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( +void CHIPTimeFormatLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10126,9 +10863,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10142,8 +10879,8 @@ } } -void CHIPUserLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10151,14 +10888,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPUserLabelClusterLabelStruct * newElement_0; - newElement_0 = [CHIPUserLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10171,9 +10902,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10187,7 +10918,7 @@ } } -void CHIPUserLabelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10210,9 +10941,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10226,8 +10957,8 @@ } } -void CHIPUserLabelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPUnitLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10249,9 +10980,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10265,8 +10996,8 @@ } } -void CHIPWakeOnLanGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPUserLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10274,8 +11005,14 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + CHIPUserLabelClusterLabelStruct * newElement_0; + newElement_0 = [CHIPUserLabelClusterLabelStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10288,9 +11025,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10304,7 +11041,7 @@ } } -void CHIPWakeOnLanAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void CHIPUserLabelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10327,9 +11064,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10343,8 +11080,8 @@ } } -void CHIPWakeOnLanAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPUserLabelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10366,9 +11103,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10382,8 +11119,8 @@ } } -void CHIPWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPUserLabelAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10405,10 +11142,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( - void * context) +void CHIPUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10422,7 +11158,7 @@ } } -void CHIPWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void CHIPWakeOnLanGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10445,9 +11181,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPWakeOnLanGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10461,8 +11197,8 @@ } } -void CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void CHIPWakeOnLanAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10484,9 +11220,9 @@ DispatchSuccess(context, objCValue); }; -void CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPWakeOnLanAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10500,17 +11236,32 @@ } } -void CHIPWindowCoveringConfigStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) +void CHIPWakeOnLanAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void CHIPWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +void CHIPWakeOnLanAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) { - auto * self = static_cast(context); + auto * self = static_cast(context); if (!self->mQueue) { return; } @@ -10524,9 +11275,151 @@ } } -void CHIPWindowCoveringModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitFlags value) -{ +void CHIPWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished( + void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPWindowCoveringConfigStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPWindowCoveringModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); @@ -10747,86 +11640,40 @@ DispatchSuccess(context, response); }; -void CHIPDoorLockClusterGetCredentialStatusResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data) +void CHIPDoorLockClusterGetLogRecordResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetLogRecordResponse::DecodableType & data) { - auto * response = [CHIPDoorLockClusterGetCredentialStatusResponseParams new]; + auto * response = [CHIPDoorLockClusterGetLogRecordResponseParams new]; { - response.credentialExists = [NSNumber numberWithBool:data.credentialExists]; - } - { - if (data.userIndex.IsNull()) { - response.userIndex = nil; - } else { - response.userIndex = [NSNumber numberWithUnsignedShort:data.userIndex.Value()]; - } + response.logEntryId = [NSNumber numberWithUnsignedShort:data.logEntryId]; } { - if (data.nextCredentialIndex.IsNull()) { - response.nextCredentialIndex = nil; - } else { - response.nextCredentialIndex = [NSNumber numberWithUnsignedShort:data.nextCredentialIndex.Value()]; - } + response.timestamp = [NSNumber numberWithUnsignedInt:data.timestamp]; } - DispatchSuccess(context, response); -}; - -void CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data) -{ - auto * response = [CHIPDoorLockClusterGetHolidayScheduleResponseParams new]; { - response.holidayIndex = [NSNumber numberWithUnsignedChar:data.holidayIndex]; + response.eventType = [NSNumber numberWithUnsignedChar:data.eventType]; } { - response.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; + response.source = [NSNumber numberWithUnsignedChar:data.source]; } { - if (data.localStartTime.HasValue()) { - response.localStartTime = [NSNumber numberWithUnsignedInt:data.localStartTime.Value()]; - } else { - response.localStartTime = nil; - } + response.eventIdOrAlarmCode = [NSNumber numberWithUnsignedChar:data.eventIdOrAlarmCode]; } { - if (data.localEndTime.HasValue()) { - response.localEndTime = [NSNumber numberWithUnsignedInt:data.localEndTime.Value()]; - } else { - response.localEndTime = nil; - } + response.userId = [NSNumber numberWithUnsignedShort:data.userId]; } { - if (data.operatingMode.HasValue()) { - response.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.operatingMode.Value())]; - } else { - response.operatingMode = nil; - } + response.pin = [NSData dataWithBytes:data.pin.data() length:data.pin.size()]; } DispatchSuccess(context, response); }; -void CHIPDoorLockClusterGetUserResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data) +void CHIPDoorLockClusterGetPINCodeResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetPINCodeResponse::DecodableType & data) { - auto * response = [CHIPDoorLockClusterGetUserResponseParams new]; - { - response.userIndex = [NSNumber numberWithUnsignedShort:data.userIndex]; - } - { - if (data.userName.IsNull()) { - response.userName = nil; - } else { - response.userName = [[NSString alloc] initWithBytes:data.userName.Value().data() - length:data.userName.Value().size() - encoding:NSUTF8StringEncoding]; - } - } + auto * response = [CHIPDoorLockClusterGetPINCodeResponseParams new]; { - if (data.userUniqueId.IsNull()) { - response.userUniqueId = nil; - } else { - response.userUniqueId = [NSNumber numberWithUnsignedInt:data.userUniqueId.Value()]; - } + response.userId = [NSNumber numberWithUnsignedShort:data.userId]; } { if (data.userStatus.IsNull()) { @@ -10843,56 +11690,24 @@ } } { - if (data.credentialRule.IsNull()) { - response.credentialRule = nil; - } else { - response.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.credentialRule.Value())]; - } - } - { - if (data.credentials.IsNull()) { - response.credentials = nil; - } else { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = data.credentials.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - CHIPDoorLockClusterDlCredential * newElement_1; - newElement_1 = [CHIPDoorLockClusterDlCredential new]; - newElement_1.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.credentialType)]; - newElement_1.credentialIndex = [NSNumber numberWithUnsignedShort:entry_1.credentialIndex]; - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - response.credentials = array_1; - } - } - } - { - if (data.creatorFabricIndex.IsNull()) { - response.creatorFabricIndex = nil; + if (data.pin.IsNull()) { + response.pin = nil; } else { - response.creatorFabricIndex = [NSNumber numberWithUnsignedChar:data.creatorFabricIndex.Value()]; + response.pin = [NSData dataWithBytes:data.pin.Value().data() length:data.pin.Value().size()]; } } + DispatchSuccess(context, response); +}; + +void CHIPDoorLockClusterGetUserStatusResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetUserStatusResponse::DecodableType & data) +{ + auto * response = [CHIPDoorLockClusterGetUserStatusResponseParams new]; { - if (data.lastModifiedFabricIndex.IsNull()) { - response.lastModifiedFabricIndex = nil; - } else { - response.lastModifiedFabricIndex = [NSNumber numberWithUnsignedChar:data.lastModifiedFabricIndex.Value()]; - } + response.userId = [NSNumber numberWithUnsignedShort:data.userId]; } { - if (data.nextUserIndex.IsNull()) { - response.nextUserIndex = nil; - } else { - response.nextUserIndex = [NSNumber numberWithUnsignedShort:data.nextUserIndex.Value()]; - } + response.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userStatus)]; } DispatchSuccess(context, response); }; @@ -10978,9 +11793,179 @@ DispatchSuccess(context, response); }; -void CHIPDoorLockClusterSetCredentialResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & data) -{ +void CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data) +{ + auto * response = [CHIPDoorLockClusterGetHolidayScheduleResponseParams new]; + { + response.holidayIndex = [NSNumber numberWithUnsignedChar:data.holidayIndex]; + } + { + response.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; + } + { + if (data.localStartTime.HasValue()) { + response.localStartTime = [NSNumber numberWithUnsignedInt:data.localStartTime.Value()]; + } else { + response.localStartTime = nil; + } + } + { + if (data.localEndTime.HasValue()) { + response.localEndTime = [NSNumber numberWithUnsignedInt:data.localEndTime.Value()]; + } else { + response.localEndTime = nil; + } + } + { + if (data.operatingMode.HasValue()) { + response.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.operatingMode.Value())]; + } else { + response.operatingMode = nil; + } + } + DispatchSuccess(context, response); +}; + +void CHIPDoorLockClusterGetUserTypeResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetUserTypeResponse::DecodableType & data) +{ + auto * response = [CHIPDoorLockClusterGetUserTypeResponseParams new]; + { + response.userId = [NSNumber numberWithUnsignedShort:data.userId]; + } + { + response.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userType)]; + } + DispatchSuccess(context, response); +}; + +void CHIPDoorLockClusterGetRFIDCodeResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetRFIDCodeResponse::DecodableType & data) +{ + auto * response = [CHIPDoorLockClusterGetRFIDCodeResponseParams new]; + { + response.userId = [NSNumber numberWithUnsignedShort:data.userId]; + } + { + if (data.userStatus.IsNull()) { + response.userStatus = nil; + } else { + response.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userStatus.Value())]; + } + } + { + if (data.userType.IsNull()) { + response.userType = nil; + } else { + response.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userType.Value())]; + } + } + { + if (data.rfidCode.IsNull()) { + response.rfidCode = nil; + } else { + response.rfidCode = [NSData dataWithBytes:data.rfidCode.Value().data() length:data.rfidCode.Value().size()]; + } + } + DispatchSuccess(context, response); +}; + +void CHIPDoorLockClusterGetUserResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data) +{ + auto * response = [CHIPDoorLockClusterGetUserResponseParams new]; + { + response.userIndex = [NSNumber numberWithUnsignedShort:data.userIndex]; + } + { + if (data.userName.IsNull()) { + response.userName = nil; + } else { + response.userName = [[NSString alloc] initWithBytes:data.userName.Value().data() + length:data.userName.Value().size() + encoding:NSUTF8StringEncoding]; + } + } + { + if (data.userUniqueId.IsNull()) { + response.userUniqueId = nil; + } else { + response.userUniqueId = [NSNumber numberWithUnsignedInt:data.userUniqueId.Value()]; + } + } + { + if (data.userStatus.IsNull()) { + response.userStatus = nil; + } else { + response.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userStatus.Value())]; + } + } + { + if (data.userType.IsNull()) { + response.userType = nil; + } else { + response.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.userType.Value())]; + } + } + { + if (data.credentialRule.IsNull()) { + response.credentialRule = nil; + } else { + response.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.credentialRule.Value())]; + } + } + { + if (data.credentials.IsNull()) { + response.credentials = nil; + } else { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = data.credentials.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + CHIPDoorLockClusterDlCredential * newElement_1; + newElement_1 = [CHIPDoorLockClusterDlCredential new]; + newElement_1.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.credentialType)]; + newElement_1.credentialIndex = [NSNumber numberWithUnsignedShort:entry_1.credentialIndex]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + response.credentials = array_1; + } + } + } + { + if (data.creatorFabricIndex.IsNull()) { + response.creatorFabricIndex = nil; + } else { + response.creatorFabricIndex = [NSNumber numberWithUnsignedChar:data.creatorFabricIndex.Value()]; + } + } + { + if (data.lastModifiedFabricIndex.IsNull()) { + response.lastModifiedFabricIndex = nil; + } else { + response.lastModifiedFabricIndex = [NSNumber numberWithUnsignedChar:data.lastModifiedFabricIndex.Value()]; + } + } + { + if (data.nextUserIndex.IsNull()) { + response.nextUserIndex = nil; + } else { + response.nextUserIndex = [NSNumber numberWithUnsignedShort:data.nextUserIndex.Value()]; + } + } + DispatchSuccess(context, response); +}; + +void CHIPDoorLockClusterSetCredentialResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & data) +{ auto * response = [CHIPDoorLockClusterSetCredentialResponseParams new]; { response.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.status)]; @@ -11002,25 +11987,34 @@ DispatchSuccess(context, response); }; -void CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data) +void CHIPDoorLockClusterGetCredentialStatusResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data) { - auto * response = [CHIPGeneralCommissioningClusterArmFailSafeResponseParams new]; + auto * response = [CHIPDoorLockClusterGetCredentialStatusResponseParams new]; { - response.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorCode)]; + response.credentialExists = [NSNumber numberWithBool:data.credentialExists]; } { - response.debugText = [[NSString alloc] initWithBytes:data.debugText.data() - length:data.debugText.size() - encoding:NSUTF8StringEncoding]; + if (data.userIndex.IsNull()) { + response.userIndex = nil; + } else { + response.userIndex = [NSNumber numberWithUnsignedShort:data.userIndex.Value()]; + } + } + { + if (data.nextCredentialIndex.IsNull()) { + response.nextCredentialIndex = nil; + } else { + response.nextCredentialIndex = [NSNumber numberWithUnsignedShort:data.nextCredentialIndex.Value()]; + } } DispatchSuccess(context, response); }; -void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data) +void CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data) { - auto * response = [CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams new]; + auto * response = [CHIPGeneralCommissioningClusterArmFailSafeResponseParams new]; { response.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorCode)]; } @@ -11047,27 +12041,17 @@ DispatchSuccess(context, response); }; -void CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & data) +void CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data) { - auto * response = [CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseParams new]; + auto * response = [CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams new]; { - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = data.groupKeySetIDs.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - response.groupKeySetIDs = array_0; - } + response.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.errorCode)]; + } + { + response.debugText = [[NSString alloc] initWithBytes:data.debugText.data() + length:data.debugText.size() + encoding:NSUTF8StringEncoding]; } DispatchSuccess(context, response); }; @@ -11118,34 +12102,14 @@ DispatchSuccess(context, response); }; -void CHIPGroupsClusterAddGroupResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data) -{ - auto * response = [CHIPGroupsClusterAddGroupResponseParams new]; - { - response.status = [NSNumber numberWithUnsignedChar:data.status]; - } - { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; - } - DispatchSuccess(context, response); -}; - -void CHIPGroupsClusterGetGroupMembershipResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & data) +void CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & data) { - auto * response = [CHIPGroupsClusterGetGroupMembershipResponseParams new]; - { - if (data.capacity.IsNull()) { - response.capacity = nil; - } else { - response.capacity = [NSNumber numberWithUnsignedChar:data.capacity.Value()]; - } - } + auto * response = [CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseParams new]; { { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; - auto iter_0 = data.groupList.begin(); + auto iter_0 = data.groupKeySetIDs.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; @@ -11157,16 +12121,16 @@ OnFailureFn(context, err); return; } - response.groupList = array_0; + response.groupKeySetIDs = array_0; } } DispatchSuccess(context, response); }; -void CHIPGroupsClusterRemoveGroupResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data) +void CHIPGroupsClusterAddGroupResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data) { - auto * response = [CHIPGroupsClusterRemoveGroupResponseParams new]; + auto * response = [CHIPGroupsClusterAddGroupResponseParams new]; { response.status = [NSNumber numberWithUnsignedChar:data.status]; } @@ -11194,8 +12158,53 @@ DispatchSuccess(context, response); }; -void CHIPIdentifyClusterIdentifyQueryResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Identify::Commands::IdentifyQueryResponse::DecodableType & data) +void CHIPGroupsClusterGetGroupMembershipResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & data) +{ + auto * response = [CHIPGroupsClusterGetGroupMembershipResponseParams new]; + { + if (data.capacity.IsNull()) { + response.capacity = nil; + } else { + response.capacity = [NSNumber numberWithUnsignedChar:data.capacity.Value()]; + } + } + { + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = data.groupList.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + response.groupList = array_0; + } + } + DispatchSuccess(context, response); +}; + +void CHIPGroupsClusterRemoveGroupResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data) +{ + auto * response = [CHIPGroupsClusterRemoveGroupResponseParams new]; + { + response.status = [NSNumber numberWithUnsignedChar:data.status]; + } + { + response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + } + DispatchSuccess(context, response); +}; + +void CHIPIdentifyClusterIdentifyQueryResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Identify::Commands::IdentifyQueryResponse::DecodableType & data) { auto * response = [CHIPIdentifyClusterIdentifyQueryResponseParams new]; { @@ -11233,58 +12242,6 @@ DispatchSuccess(context, response); }; -void CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data) -{ - auto * response = [CHIPNetworkCommissioningClusterConnectNetworkResponseParams new]; - { - response.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.networkingStatus)]; - } - { - if (data.debugText.HasValue()) { - response.debugText = [[NSString alloc] initWithBytes:data.debugText.Value().data() - length:data.debugText.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - response.debugText = nil; - } - } - { - if (data.errorValue.IsNull()) { - response.errorValue = nil; - } else { - response.errorValue = [NSNumber numberWithInt:data.errorValue.Value()]; - } - } - DispatchSuccess(context, response); -}; - -void CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data) -{ - auto * response = [CHIPNetworkCommissioningClusterNetworkConfigResponseParams new]; - { - response.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.networkingStatus)]; - } - { - if (data.debugText.HasValue()) { - response.debugText = [[NSString alloc] initWithBytes:data.debugText.Value().data() - length:data.debugText.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - response.debugText = nil; - } - } - { - if (data.networkIndex.HasValue()) { - response.networkIndex = [NSNumber numberWithUnsignedChar:data.networkIndex.Value()]; - } else { - response.networkIndex = nil; - } - } - DispatchSuccess(context, response); -}; - void CHIPNetworkCommissioningClusterScanNetworksResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data) { @@ -11365,15 +12322,54 @@ DispatchSuccess(context, response); }; -void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data) +void CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data) { - auto * response = [CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseParams new]; + auto * response = [CHIPNetworkCommissioningClusterNetworkConfigResponseParams new]; { - response.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.action)]; + response.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.networkingStatus)]; } { - response.delayedActionTime = [NSNumber numberWithUnsignedInt:data.delayedActionTime]; + if (data.debugText.HasValue()) { + response.debugText = [[NSString alloc] initWithBytes:data.debugText.Value().data() + length:data.debugText.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + response.debugText = nil; + } + } + { + if (data.networkIndex.HasValue()) { + response.networkIndex = [NSNumber numberWithUnsignedChar:data.networkIndex.Value()]; + } else { + response.networkIndex = nil; + } + } + DispatchSuccess(context, response); +}; + +void CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data) +{ + auto * response = [CHIPNetworkCommissioningClusterConnectNetworkResponseParams new]; + { + response.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.networkingStatus)]; + } + { + if (data.debugText.HasValue()) { + response.debugText = [[NSString alloc] initWithBytes:data.debugText.Value().data() + length:data.debugText.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + response.debugText = nil; + } + } + { + if (data.errorValue.IsNull()) { + response.errorValue = nil; + } else { + response.errorValue = [NSNumber numberWithInt:data.errorValue.Value()]; + } } DispatchSuccess(context, response); }; @@ -11442,6 +12438,19 @@ DispatchSuccess(context, response); }; +void CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data) +{ + auto * response = [CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseParams new]; + { + response.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.action)]; + } + { + response.delayedActionTime = [NSNumber numberWithUnsignedInt:data.delayedActionTime]; + } + DispatchSuccess(context, response); +}; + void CHIPOperationalCredentialsClusterAttestationResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & data) { @@ -11456,6 +12465,16 @@ DispatchSuccess(context, response); }; +void CHIPOperationalCredentialsClusterCertificateChainResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & data) +{ + auto * response = [CHIPOperationalCredentialsClusterCertificateChainResponseParams new]; + { + response.certificate = [NSData dataWithBytes:data.certificate.data() length:data.certificate.size()]; + } + DispatchSuccess(context, response); +}; + void CHIPOperationalCredentialsClusterCSRResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & data) { @@ -11470,16 +12489,6 @@ DispatchSuccess(context, response); }; -void CHIPOperationalCredentialsClusterCertificateChainResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & data) -{ - auto * response = [CHIPOperationalCredentialsClusterCertificateChainResponseParams new]; - { - response.certificate = [NSData dataWithBytes:data.certificate.data() length:data.certificate.size()]; - } - DispatchSuccess(context, response); -}; - void CHIPOperationalCredentialsClusterNOCResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & data) { @@ -11522,30 +12531,38 @@ DispatchSuccess(context, response); }; -void CHIPScenesClusterGetSceneMembershipResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data) +void CHIPScenesClusterViewSceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data) { - auto * response = [CHIPScenesClusterGetSceneMembershipResponseParams new]; + auto * response = [CHIPScenesClusterViewSceneResponseParams new]; { response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.capacity = [NSNumber numberWithUnsignedChar:data.capacity]; + response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; } { - response.sceneCount = [NSNumber numberWithUnsignedChar:data.sceneCount]; + response.transitionTime = [NSNumber numberWithUnsignedShort:data.transitionTime]; + } + { + response.sceneName = [[NSString alloc] initWithBytes:data.sceneName.data() + length:data.sceneName.size() + encoding:NSUTF8StringEncoding]; } { { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; - auto iter_0 = data.sceneList.begin(); + auto iter_0 = data.extensionFieldSets.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + CHIPScenesClusterSceneExtensionFieldSet * newElement_0; + newElement_0 = [CHIPScenesClusterSceneExtensionFieldSet new]; + newElement_0.clusterId = [NSNumber numberWithUnsignedInt:entry_0.clusterId]; + newElement_0.length = [NSNumber numberWithUnsignedChar:entry_0.length]; + newElement_0.value = [NSNumber numberWithUnsignedChar:entry_0.value]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -11553,38 +12570,38 @@ OnFailureFn(context, err); return; } - response.sceneList = array_0; + response.extensionFieldSets = array_0; } } DispatchSuccess(context, response); }; -void CHIPScenesClusterRemoveAllScenesResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data) +void CHIPScenesClusterRemoveSceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data) { - auto * response = [CHIPScenesClusterRemoveAllScenesResponseParams new]; + auto * response = [CHIPScenesClusterRemoveSceneResponseParams new]; { response.status = [NSNumber numberWithUnsignedChar:data.status]; } { response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; } + { + response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; + } DispatchSuccess(context, response); }; -void CHIPScenesClusterRemoveSceneResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data) +void CHIPScenesClusterRemoveAllScenesResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data) { - auto * response = [CHIPScenesClusterRemoveSceneResponseParams new]; + auto * response = [CHIPScenesClusterRemoveAllScenesResponseParams new]; { response.status = [NSNumber numberWithUnsignedChar:data.status]; } { response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; } - { - response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; - } DispatchSuccess(context, response); }; @@ -11604,38 +12621,30 @@ DispatchSuccess(context, response); }; -void CHIPScenesClusterViewSceneResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data) +void CHIPScenesClusterGetSceneMembershipResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data) { - auto * response = [CHIPScenesClusterViewSceneResponseParams new]; + auto * response = [CHIPScenesClusterGetSceneMembershipResponseParams new]; { response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; - } - { - response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; + response.capacity = [NSNumber numberWithUnsignedChar:data.capacity]; } { - response.transitionTime = [NSNumber numberWithUnsignedShort:data.transitionTime]; + response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; } { - response.sceneName = [[NSString alloc] initWithBytes:data.sceneName.data() - length:data.sceneName.size() - encoding:NSUTF8StringEncoding]; + response.sceneCount = [NSNumber numberWithUnsignedChar:data.sceneCount]; } { { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; - auto iter_0 = data.extensionFieldSets.begin(); + auto iter_0 = data.sceneList.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - CHIPScenesClusterSceneExtensionFieldSet * newElement_0; - newElement_0 = [CHIPScenesClusterSceneExtensionFieldSet new]; - newElement_0.clusterId = [NSNumber numberWithUnsignedInt:entry_0.clusterId]; - newElement_0.length = [NSNumber numberWithUnsignedChar:entry_0.length]; - newElement_0.value = [NSNumber numberWithUnsignedChar:entry_0.value]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -11643,13 +12652,90 @@ OnFailureFn(context, err); return; } - response.extensionFieldSets = array_0; + response.sceneList = array_0; } } DispatchSuccess(context, response); }; -void CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge::OnSuccessFn( +void CHIPScenesClusterEnhancedAddSceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & data) +{ + auto * response = [CHIPScenesClusterEnhancedAddSceneResponseParams new]; + { + response.status = [NSNumber numberWithUnsignedChar:data.status]; + } + { + response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + } + { + response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; + } + DispatchSuccess(context, response); +}; + +void CHIPScenesClusterEnhancedViewSceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & data) +{ + auto * response = [CHIPScenesClusterEnhancedViewSceneResponseParams new]; + { + response.status = [NSNumber numberWithUnsignedChar:data.status]; + } + { + response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + } + { + response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; + } + { + response.transitionTime = [NSNumber numberWithUnsignedShort:data.transitionTime]; + } + { + response.sceneName = [[NSString alloc] initWithBytes:data.sceneName.data() + length:data.sceneName.size() + encoding:NSUTF8StringEncoding]; + } + { + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = data.extensionFieldSets.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPScenesClusterSceneExtensionFieldSet * newElement_0; + newElement_0 = [CHIPScenesClusterSceneExtensionFieldSet new]; + newElement_0.clusterId = [NSNumber numberWithUnsignedInt:entry_0.clusterId]; + newElement_0.length = [NSNumber numberWithUnsignedChar:entry_0.length]; + newElement_0.value = [NSNumber numberWithUnsignedChar:entry_0.value]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + response.extensionFieldSets = array_0; + } + } + DispatchSuccess(context, response); +}; + +void CHIPScenesClusterCopySceneResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & data) +{ + auto * response = [CHIPScenesClusterCopySceneResponseParams new]; + { + response.status = [NSNumber numberWithUnsignedChar:data.status]; + } + { + response.groupIdFrom = [NSNumber numberWithUnsignedShort:data.groupIdFrom]; + } + { + response.sceneIdFrom = [NSNumber numberWithUnsignedChar:data.sceneIdFrom]; + } + DispatchSuccess(context, response); +}; + +void CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data) { auto * response = [CHIPTargetNavigatorClusterNavigateTargetResponseParams new]; @@ -11668,32 +12754,12 @@ DispatchSuccess(context, response); }; -void CHIPTestClusterClusterBooleanResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & data) -{ - auto * response = [CHIPTestClusterClusterBooleanResponseParams new]; - { - response.value = [NSNumber numberWithBool:data.value]; - } - DispatchSuccess(context, response); -}; - -void CHIPTestClusterClusterSimpleStructResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType & data) +void CHIPTestClusterClusterTestSpecificResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & data) { - auto * response = [CHIPTestClusterClusterSimpleStructResponseParams new]; + auto * response = [CHIPTestClusterClusterTestSpecificResponseParams new]; { - response.arg1 = [CHIPTestClusterClusterSimpleStruct new]; - response.arg1.a = [NSNumber numberWithUnsignedChar:data.arg1.a]; - response.arg1.b = [NSNumber numberWithBool:data.arg1.b]; - response.arg1.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg1.c)]; - response.arg1.d = [NSData dataWithBytes:data.arg1.d.data() length:data.arg1.d.size()]; - response.arg1.e = [[NSString alloc] initWithBytes:data.arg1.e.data() - length:data.arg1.e.size() - encoding:NSUTF8StringEncoding]; - response.arg1.f = [NSNumber numberWithUnsignedChar:data.arg1.f.Raw()]; - response.arg1.g = [NSNumber numberWithFloat:data.arg1.g]; - response.arg1.h = [NSNumber numberWithDouble:data.arg1.h]; + response.returnValue = [NSNumber numberWithUnsignedChar:data.returnValue]; } DispatchSuccess(context, response); }; @@ -11708,28 +12774,192 @@ DispatchSuccess(context, response); }; -void CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data) +void CHIPTestClusterClusterTestSimpleArgumentResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentResponse::DecodableType & data) { - auto * response = [CHIPTestClusterClusterTestEmitTestEventResponseParams new]; + auto * response = [CHIPTestClusterClusterTestSimpleArgumentResponseParams new]; { - response.value = [NSNumber numberWithUnsignedLongLong:data.value]; + response.returnValue = [NSNumber numberWithBool:data.returnValue]; } DispatchSuccess(context, response); }; -void CHIPTestClusterClusterTestEnumsResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data) +void CHIPTestClusterClusterTestStructArrayArgumentResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType & data) { - auto * response = [CHIPTestClusterClusterTestEnumsResponseParams new]; - { - response.arg1 = [NSNumber numberWithUnsignedShort:chip::to_underlying(data.arg1)]; + auto * response = [CHIPTestClusterClusterTestStructArrayArgumentResponseParams new]; + { { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = data.arg1.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPTestClusterClusterNestedStructList * newElement_0; + newElement_0 = [CHIPTestClusterClusterNestedStructList new]; + newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a]; + newElement_0.b = [NSNumber numberWithBool:entry_0.b]; + newElement_0.c = [CHIPTestClusterClusterSimpleStruct new]; + newElement_0.c.a = [NSNumber numberWithUnsignedChar:entry_0.c.a]; + newElement_0.c.b = [NSNumber numberWithBool:entry_0.c.b]; + newElement_0.c.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c.c)]; + newElement_0.c.d = [NSData dataWithBytes:entry_0.c.d.data() length:entry_0.c.d.size()]; + newElement_0.c.e = [[NSString alloc] initWithBytes:entry_0.c.e.data() + length:entry_0.c.e.size() + encoding:NSUTF8StringEncoding]; + newElement_0.c.f = [NSNumber numberWithUnsignedChar:entry_0.c.f.Raw()]; + newElement_0.c.g = [NSNumber numberWithFloat:entry_0.c.g]; + newElement_0.c.h = [NSNumber numberWithDouble:entry_0.c.h]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.d.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + CHIPTestClusterClusterSimpleStruct * newElement_2; + newElement_2 = [CHIPTestClusterClusterSimpleStruct new]; + newElement_2.a = [NSNumber numberWithUnsignedChar:entry_2.a]; + newElement_2.b = [NSNumber numberWithBool:entry_2.b]; + newElement_2.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.c)]; + newElement_2.d = [NSData dataWithBytes:entry_2.d.data() length:entry_2.d.size()]; + newElement_2.e = [[NSString alloc] initWithBytes:entry_2.e.data() + length:entry_2.e.size() + encoding:NSUTF8StringEncoding]; + newElement_2.f = [NSNumber numberWithUnsignedChar:entry_2.f.Raw()]; + newElement_2.g = [NSNumber numberWithFloat:entry_2.g]; + newElement_2.h = [NSNumber numberWithDouble:entry_2.h]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.d = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.e.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedInt:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.e = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.f.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.f = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.g.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedChar:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.g = array_2; + } + [array_0 addObject:newElement_0]; } - { - response.arg2 = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg2)]; + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - DispatchSuccess(context, response); -}; + response.arg1 = array_0; +} +} +{ { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; +auto iter_0 = data.arg2.begin(); +while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPTestClusterClusterSimpleStruct * newElement_0; + newElement_0 = [CHIPTestClusterClusterSimpleStruct new]; + newElement_0.a = [NSNumber numberWithUnsignedChar:entry_0.a]; + newElement_0.b = [NSNumber numberWithBool:entry_0.b]; + newElement_0.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.c)]; + newElement_0.d = [NSData dataWithBytes:entry_0.d.data() length:entry_0.d.size()]; + newElement_0.e = [[NSString alloc] initWithBytes:entry_0.e.data() length:entry_0.e.size() encoding:NSUTF8StringEncoding]; + newElement_0.f = [NSNumber numberWithUnsignedChar:entry_0.f.Raw()]; + newElement_0.g = [NSNumber numberWithFloat:entry_0.g]; + newElement_0.h = [NSNumber numberWithDouble:entry_0.h]; + [array_0 addObject:newElement_0]; +} +CHIP_ERROR err = iter_0.GetStatus(); +if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; +} +response.arg2 = array_0; +} +} +{ { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; +auto iter_0 = data.arg3.begin(); +while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; +} +CHIP_ERROR err = iter_0.GetStatus(); +if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; +} +response.arg3 = array_0; +} +} +{ { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; +auto iter_0 = data.arg4.begin(); +while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithBool:entry_0]; + [array_0 addObject:newElement_0]; +} +CHIP_ERROR err = iter_0.GetStatus(); +if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; +} +response.arg4 = array_0; +} +} +{ + response.arg5 = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg5)]; +} +{ + response.arg6 = [NSNumber numberWithBool:data.arg6]; +} +DispatchSuccess(context, response); +} +; void CHIPTestClusterClusterTestListInt8UReverseResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & data) @@ -11756,6 +12986,19 @@ DispatchSuccess(context, response); }; +void CHIPTestClusterClusterTestEnumsResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data) +{ + auto * response = [CHIPTestClusterClusterTestEnumsResponseParams new]; + { + response.arg1 = [NSNumber numberWithUnsignedShort:chip::to_underlying(data.arg1)]; + } + { + response.arg2 = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg2)]; + } + DispatchSuccess(context, response); +}; + void CHIPTestClusterClusterTestNullableOptionalResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType & data) { @@ -11791,37 +13034,296 @@ DispatchSuccess(context, response); }; -void CHIPTestClusterClusterTestSpecificResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & data) +void CHIPTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalResponse::DecodableType & data) { - auto * response = [CHIPTestClusterClusterTestSpecificResponseParams new]; + auto * response = [CHIPTestClusterClusterTestComplexNullableOptionalResponseParams new]; { - response.returnValue = [NSNumber numberWithUnsignedChar:data.returnValue]; + response.nullableIntWasNull = [NSNumber numberWithBool:data.nullableIntWasNull]; } - DispatchSuccess(context, response); -}; - -void CHIPThermostatClusterGetRelayStatusLogResponseCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & data) -{ - auto * response = [CHIPThermostatClusterGetRelayStatusLogResponseParams new]; { - response.timeOfDay = [NSNumber numberWithUnsignedShort:data.timeOfDay]; + if (data.nullableIntValue.HasValue()) { + response.nullableIntValue = [NSNumber numberWithUnsignedShort:data.nullableIntValue.Value()]; + } else { + response.nullableIntValue = nil; + } } { - response.relayStatus = [NSNumber numberWithUnsignedShort:data.relayStatus]; + response.optionalIntWasPresent = [NSNumber numberWithBool:data.optionalIntWasPresent]; } { - response.localTemperature = [NSNumber numberWithShort:data.localTemperature]; + if (data.optionalIntValue.HasValue()) { + response.optionalIntValue = [NSNumber numberWithUnsignedShort:data.optionalIntValue.Value()]; + } else { + response.optionalIntValue = nil; + } } { - response.humidityInPercentage = [NSNumber numberWithUnsignedChar:data.humidityInPercentage]; + response.nullableOptionalIntWasPresent = [NSNumber numberWithBool:data.nullableOptionalIntWasPresent]; } { - response.setpoint = [NSNumber numberWithShort:data.setpoint]; + if (data.nullableOptionalIntWasNull.HasValue()) { + response.nullableOptionalIntWasNull = [NSNumber numberWithBool:data.nullableOptionalIntWasNull.Value()]; + } else { + response.nullableOptionalIntWasNull = nil; + } } { - response.unreadEntries = [NSNumber numberWithUnsignedShort:data.unreadEntries]; + if (data.nullableOptionalIntValue.HasValue()) { + response.nullableOptionalIntValue = [NSNumber numberWithUnsignedShort:data.nullableOptionalIntValue.Value()]; + } else { + response.nullableOptionalIntValue = nil; + } + } + { + response.nullableStringWasNull = [NSNumber numberWithBool:data.nullableStringWasNull]; + } + { + if (data.nullableStringValue.HasValue()) { + response.nullableStringValue = [[NSString alloc] initWithBytes:data.nullableStringValue.Value().data() + length:data.nullableStringValue.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + response.nullableStringValue = nil; + } + } + { + response.optionalStringWasPresent = [NSNumber numberWithBool:data.optionalStringWasPresent]; + } + { + if (data.optionalStringValue.HasValue()) { + response.optionalStringValue = [[NSString alloc] initWithBytes:data.optionalStringValue.Value().data() + length:data.optionalStringValue.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + response.optionalStringValue = nil; + } + } + { + response.nullableOptionalStringWasPresent = [NSNumber numberWithBool:data.nullableOptionalStringWasPresent]; + } + { + if (data.nullableOptionalStringWasNull.HasValue()) { + response.nullableOptionalStringWasNull = [NSNumber numberWithBool:data.nullableOptionalStringWasNull.Value()]; + } else { + response.nullableOptionalStringWasNull = nil; + } + } + { + if (data.nullableOptionalStringValue.HasValue()) { + response.nullableOptionalStringValue = [[NSString alloc] initWithBytes:data.nullableOptionalStringValue.Value().data() + length:data.nullableOptionalStringValue.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + response.nullableOptionalStringValue = nil; + } + } + { + response.nullableStructWasNull = [NSNumber numberWithBool:data.nullableStructWasNull]; + } + { + if (data.nullableStructValue.HasValue()) { + response.nullableStructValue = [CHIPTestClusterClusterSimpleStruct new]; + response.nullableStructValue.a = [NSNumber numberWithUnsignedChar:data.nullableStructValue.Value().a]; + response.nullableStructValue.b = [NSNumber numberWithBool:data.nullableStructValue.Value().b]; + response.nullableStructValue.c = + [NSNumber numberWithUnsignedChar:chip::to_underlying(data.nullableStructValue.Value().c)]; + response.nullableStructValue.d = [NSData dataWithBytes:data.nullableStructValue.Value().d.data() + length:data.nullableStructValue.Value().d.size()]; + response.nullableStructValue.e = [[NSString alloc] initWithBytes:data.nullableStructValue.Value().e.data() + length:data.nullableStructValue.Value().e.size() + encoding:NSUTF8StringEncoding]; + response.nullableStructValue.f = [NSNumber numberWithUnsignedChar:data.nullableStructValue.Value().f.Raw()]; + response.nullableStructValue.g = [NSNumber numberWithFloat:data.nullableStructValue.Value().g]; + response.nullableStructValue.h = [NSNumber numberWithDouble:data.nullableStructValue.Value().h]; + } else { + response.nullableStructValue = nil; + } + } + { + response.optionalStructWasPresent = [NSNumber numberWithBool:data.optionalStructWasPresent]; + } + { + if (data.optionalStructValue.HasValue()) { + response.optionalStructValue = [CHIPTestClusterClusterSimpleStruct new]; + response.optionalStructValue.a = [NSNumber numberWithUnsignedChar:data.optionalStructValue.Value().a]; + response.optionalStructValue.b = [NSNumber numberWithBool:data.optionalStructValue.Value().b]; + response.optionalStructValue.c = + [NSNumber numberWithUnsignedChar:chip::to_underlying(data.optionalStructValue.Value().c)]; + response.optionalStructValue.d = [NSData dataWithBytes:data.optionalStructValue.Value().d.data() + length:data.optionalStructValue.Value().d.size()]; + response.optionalStructValue.e = [[NSString alloc] initWithBytes:data.optionalStructValue.Value().e.data() + length:data.optionalStructValue.Value().e.size() + encoding:NSUTF8StringEncoding]; + response.optionalStructValue.f = [NSNumber numberWithUnsignedChar:data.optionalStructValue.Value().f.Raw()]; + response.optionalStructValue.g = [NSNumber numberWithFloat:data.optionalStructValue.Value().g]; + response.optionalStructValue.h = [NSNumber numberWithDouble:data.optionalStructValue.Value().h]; + } else { + response.optionalStructValue = nil; + } + } + { + response.nullableOptionalStructWasPresent = [NSNumber numberWithBool:data.nullableOptionalStructWasPresent]; + } + { + if (data.nullableOptionalStructWasNull.HasValue()) { + response.nullableOptionalStructWasNull = [NSNumber numberWithBool:data.nullableOptionalStructWasNull.Value()]; + } else { + response.nullableOptionalStructWasNull = nil; + } + } + { + if (data.nullableOptionalStructValue.HasValue()) { + response.nullableOptionalStructValue = [CHIPTestClusterClusterSimpleStruct new]; + response.nullableOptionalStructValue.a = [NSNumber numberWithUnsignedChar:data.nullableOptionalStructValue.Value().a]; + response.nullableOptionalStructValue.b = [NSNumber numberWithBool:data.nullableOptionalStructValue.Value().b]; + response.nullableOptionalStructValue.c = + [NSNumber numberWithUnsignedChar:chip::to_underlying(data.nullableOptionalStructValue.Value().c)]; + response.nullableOptionalStructValue.d = [NSData dataWithBytes:data.nullableOptionalStructValue.Value().d.data() + length:data.nullableOptionalStructValue.Value().d.size()]; + response.nullableOptionalStructValue.e = + [[NSString alloc] initWithBytes:data.nullableOptionalStructValue.Value().e.data() + length:data.nullableOptionalStructValue.Value().e.size() + encoding:NSUTF8StringEncoding]; + response.nullableOptionalStructValue.f = + [NSNumber numberWithUnsignedChar:data.nullableOptionalStructValue.Value().f.Raw()]; + response.nullableOptionalStructValue.g = [NSNumber numberWithFloat:data.nullableOptionalStructValue.Value().g]; + response.nullableOptionalStructValue.h = [NSNumber numberWithDouble:data.nullableOptionalStructValue.Value().h]; + } else { + response.nullableOptionalStructValue = nil; + } + } + { + response.nullableListWasNull = [NSNumber numberWithBool:data.nullableListWasNull]; + } + { + if (data.nullableListValue.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = data.nullableListValue.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSNumber * newElement_1; + newElement_1 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1)]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + response.nullableListValue = array_1; + } + } else { + response.nullableListValue = nil; + } + } + { + response.optionalListWasPresent = [NSNumber numberWithBool:data.optionalListWasPresent]; + } + { + if (data.optionalListValue.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = data.optionalListValue.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSNumber * newElement_1; + newElement_1 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1)]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + response.optionalListValue = array_1; + } + } else { + response.optionalListValue = nil; + } + } + { + response.nullableOptionalListWasPresent = [NSNumber numberWithBool:data.nullableOptionalListWasPresent]; + } + { + if (data.nullableOptionalListWasNull.HasValue()) { + response.nullableOptionalListWasNull = [NSNumber numberWithBool:data.nullableOptionalListWasNull.Value()]; + } else { + response.nullableOptionalListWasNull = nil; + } + } + { + if (data.nullableOptionalListValue.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = data.nullableOptionalListValue.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + NSNumber * newElement_1; + newElement_1 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1)]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + response.nullableOptionalListValue = array_1; + } + } else { + response.nullableOptionalListValue = nil; + } + } + DispatchSuccess(context, response); +}; + +void CHIPTestClusterClusterBooleanResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & data) +{ + auto * response = [CHIPTestClusterClusterBooleanResponseParams new]; + { + response.value = [NSNumber numberWithBool:data.value]; + } + DispatchSuccess(context, response); +}; + +void CHIPTestClusterClusterSimpleStructResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType & data) +{ + auto * response = [CHIPTestClusterClusterSimpleStructResponseParams new]; + { + response.arg1 = [CHIPTestClusterClusterSimpleStruct new]; + response.arg1.a = [NSNumber numberWithUnsignedChar:data.arg1.a]; + response.arg1.b = [NSNumber numberWithBool:data.arg1.b]; + response.arg1.c = [NSNumber numberWithUnsignedChar:chip::to_underlying(data.arg1.c)]; + response.arg1.d = [NSData dataWithBytes:data.arg1.d.data() length:data.arg1.d.size()]; + response.arg1.e = [[NSString alloc] initWithBytes:data.arg1.e.data() + length:data.arg1.e.size() + encoding:NSUTF8StringEncoding]; + response.arg1.f = [NSNumber numberWithUnsignedChar:data.arg1.f.Raw()]; + response.arg1.g = [NSNumber numberWithFloat:data.arg1.g]; + response.arg1.h = [NSNumber numberWithDouble:data.arg1.h]; + } + DispatchSuccess(context, response); +}; + +void CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data) +{ + auto * response = [CHIPTestClusterClusterTestEmitTestEventResponseParams new]; + { + response.value = [NSNumber numberWithUnsignedLongLong:data.value]; + } + DispatchSuccess(context, response); +}; + +void CHIPTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data) +{ + auto * response = [CHIPTestClusterClusterTestEmitTestFabricScopedEventResponseParams new]; + { + response.value = [NSNumber numberWithUnsignedLongLong:data.value]; } DispatchSuccess(context, response); }; @@ -11860,6 +13362,31 @@ DispatchSuccess(context, response); }; +void CHIPThermostatClusterGetRelayStatusLogResponseCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & data) +{ + auto * response = [CHIPThermostatClusterGetRelayStatusLogResponseParams new]; + { + response.timeOfDay = [NSNumber numberWithUnsignedShort:data.timeOfDay]; + } + { + response.relayStatus = [NSNumber numberWithUnsignedShort:data.relayStatus]; + } + { + response.localTemperature = [NSNumber numberWithShort:data.localTemperature]; + } + { + response.humidityInPercentage = [NSNumber numberWithUnsignedChar:data.humidityInPercentage]; + } + { + response.setpoint = [NSNumber numberWithShort:data.setpoint]; + } + { + response.unreadEntries = [NSNumber numberWithUnsignedShort:data.unreadEntries]; + } + DispatchSuccess(context, response); +}; + void CHIPIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge::OnSuccessFn( void * context, chip::app::Clusters::Identify::IdentifyEffectIdentifier value) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index c1a32865b5e2e4..f673019af679db 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -22,6 +22,7 @@ #include #include +#include typedef void (*CommandSuccessCallback)(void *, const chip::app::DataModel::NullObjectType &); using CHIPCommandSuccessCallbackType = CommandSuccessCallback; @@ -40,94 +41,118 @@ typedef void (*CHIPContentLauncherClusterLaunchResponseCallbackType)( void *, const chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::DecodableType &); typedef void (*CHIPDiagnosticLogsClusterRetrieveLogsResponseCallbackType)( void *, const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType &); -typedef void (*CHIPDoorLockClusterGetCredentialStatusResponseCallbackType)( - void *, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType &); -typedef void (*CHIPDoorLockClusterGetHolidayScheduleResponseCallbackType)( - void *, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType &); -typedef void (*CHIPDoorLockClusterGetUserResponseCallbackType)( - void *, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType &); +typedef void (*CHIPDoorLockClusterGetLogRecordResponseCallbackType)( + void *, const chip::app::Clusters::DoorLock::Commands::GetLogRecordResponse::DecodableType &); +typedef void (*CHIPDoorLockClusterGetPINCodeResponseCallbackType)( + void *, const chip::app::Clusters::DoorLock::Commands::GetPINCodeResponse::DecodableType &); +typedef void (*CHIPDoorLockClusterGetUserStatusResponseCallbackType)( + void *, const chip::app::Clusters::DoorLock::Commands::GetUserStatusResponse::DecodableType &); typedef void (*CHIPDoorLockClusterGetWeekDayScheduleResponseCallbackType)( void *, const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType &); typedef void (*CHIPDoorLockClusterGetYearDayScheduleResponseCallbackType)( void *, const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType &); +typedef void (*CHIPDoorLockClusterGetHolidayScheduleResponseCallbackType)( + void *, const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType &); +typedef void (*CHIPDoorLockClusterGetUserTypeResponseCallbackType)( + void *, const chip::app::Clusters::DoorLock::Commands::GetUserTypeResponse::DecodableType &); +typedef void (*CHIPDoorLockClusterGetRFIDCodeResponseCallbackType)( + void *, const chip::app::Clusters::DoorLock::Commands::GetRFIDCodeResponse::DecodableType &); +typedef void (*CHIPDoorLockClusterGetUserResponseCallbackType)( + void *, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType &); typedef void (*CHIPDoorLockClusterSetCredentialResponseCallbackType)( void *, const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType &); +typedef void (*CHIPDoorLockClusterGetCredentialStatusResponseCallbackType)( + void *, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType &); typedef void (*CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackType)( void *, const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType &); -typedef void (*CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackType)( - void *, const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType &); typedef void (*CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackType)( void *, const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType &); -typedef void (*CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType)( - void *, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType &); +typedef void (*CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackType)( + void *, const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType &); typedef void (*CHIPGroupKeyManagementClusterKeySetReadResponseCallbackType)( void *, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType &); +typedef void (*CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType)( + void *, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType &); typedef void (*CHIPGroupsClusterAddGroupResponseCallbackType)( void *, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType &); +typedef void (*CHIPGroupsClusterViewGroupResponseCallbackType)( + void *, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType &); typedef void (*CHIPGroupsClusterGetGroupMembershipResponseCallbackType)( void *, const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType &); typedef void (*CHIPGroupsClusterRemoveGroupResponseCallbackType)( void *, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType &); -typedef void (*CHIPGroupsClusterViewGroupResponseCallbackType)( - void *, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType &); typedef void (*CHIPIdentifyClusterIdentifyQueryResponseCallbackType)( void *, const chip::app::Clusters::Identify::Commands::IdentifyQueryResponse::DecodableType &); typedef void (*CHIPKeypadInputClusterSendKeyResponseCallbackType)( void *, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType &); typedef void (*CHIPMediaPlaybackClusterPlaybackResponseCallbackType)( void *, const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType &); -typedef void (*CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackType)( - void *, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType &); -typedef void (*CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackType)( - void *, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType &); typedef void (*CHIPNetworkCommissioningClusterScanNetworksResponseCallbackType)( void *, const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType &); -typedef void (*CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackType)( - void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType &); +typedef void (*CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackType)( + void *, const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType &); +typedef void (*CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackType)( + void *, const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType &); typedef void (*CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackType)( void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType &); +typedef void (*CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackType)( + void *, const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType &); typedef void (*CHIPOperationalCredentialsClusterAttestationResponseCallbackType)( void *, const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType &); -typedef void (*CHIPOperationalCredentialsClusterCSRResponseCallbackType)( - void *, const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType &); typedef void (*CHIPOperationalCredentialsClusterCertificateChainResponseCallbackType)( void *, const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType &); +typedef void (*CHIPOperationalCredentialsClusterCSRResponseCallbackType)( + void *, const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType &); typedef void (*CHIPOperationalCredentialsClusterNOCResponseCallbackType)( void *, const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType &); typedef void (*CHIPScenesClusterAddSceneResponseCallbackType)( void *, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType &); -typedef void (*CHIPScenesClusterGetSceneMembershipResponseCallbackType)( - void *, const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType &); -typedef void (*CHIPScenesClusterRemoveAllScenesResponseCallbackType)( - void *, const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType &); +typedef void (*CHIPScenesClusterViewSceneResponseCallbackType)( + void *, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType &); typedef void (*CHIPScenesClusterRemoveSceneResponseCallbackType)( void *, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType &); +typedef void (*CHIPScenesClusterRemoveAllScenesResponseCallbackType)( + void *, const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType &); typedef void (*CHIPScenesClusterStoreSceneResponseCallbackType)( void *, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType &); -typedef void (*CHIPScenesClusterViewSceneResponseCallbackType)( - void *, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType &); +typedef void (*CHIPScenesClusterGetSceneMembershipResponseCallbackType)( + void *, const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType &); +typedef void (*CHIPScenesClusterEnhancedAddSceneResponseCallbackType)( + void *, const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType &); +typedef void (*CHIPScenesClusterEnhancedViewSceneResponseCallbackType)( + void *, const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType &); +typedef void (*CHIPScenesClusterCopySceneResponseCallbackType)( + void *, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType &); typedef void (*CHIPTargetNavigatorClusterNavigateTargetResponseCallbackType)( void *, const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType &); -typedef void (*CHIPTestClusterClusterBooleanResponseCallbackType)( - void *, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType &); -typedef void (*CHIPTestClusterClusterSimpleStructResponseCallbackType)( - void *, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestSpecificResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestAddArgumentsResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType &); -typedef void (*CHIPTestClusterClusterTestEmitTestEventResponseCallbackType)( - void *, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType &); -typedef void (*CHIPTestClusterClusterTestEnumsResponseCallbackType)( - void *, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestSimpleArgumentResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestStructArrayArgumentResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestListInt8UReverseResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestEnumsResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType &); typedef void (*CHIPTestClusterClusterTestNullableOptionalResponseCallbackType)( void *, const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType &); -typedef void (*CHIPTestClusterClusterTestSpecificResponseCallbackType)( - void *, const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType &); -typedef void (*CHIPThermostatClusterGetRelayStatusLogResponseCallbackType)( - void *, const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestComplexNullableOptionalResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterBooleanResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterSimpleStructResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestEmitTestEventResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType &); +typedef void (*CHIPTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackType)( + void *, const chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventResponse::DecodableType &); typedef void (*CHIPThermostatClusterGetWeeklyScheduleResponseCallbackType)( void *, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType &); +typedef void (*CHIPThermostatClusterGetRelayStatusLogResponseCallbackType)( + void *, const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType &); typedef void (*IdentifyClusterIdentifyEffectIdentifierAttributeCallback)(void *, chip::app::Clusters::Identify::IdentifyEffectIdentifier); @@ -577,29 +602,491 @@ typedef void (*ApplianceEventsAndAlertClusterEventIdentificationAttributeCallbac typedef void (*NullableApplianceEventsAndAlertClusterEventIdentificationAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*AccessControlAclListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*AccessControlExtensionListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*AccessControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AccessControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AccessControlAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AccountLoginGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AccountLoginAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AccountLoginAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*AdministratorCommissioningGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AdministratorCommissioningAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AdministratorCommissioningAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationBasicApplicationStructAttributeCallback)( void *, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationBasicApplication::DecodableType &); +typedef void (*ApplicationBasicAllowedVendorListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ApplicationBasicGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ApplicationBasicAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ApplicationBasicAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ApplicationLauncherCatalogListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationLauncherCurrentAppStructAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*ApplicationLauncherGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ApplicationLauncherAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ApplicationLauncherAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AudioOutputOutputListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*AudioOutputGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AudioOutputAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AudioOutputAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BarrierControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BarrierControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BarrierControlAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BasicCapabilityMinimaStructAttributeCallback)( void *, const chip::app::Clusters::Basic::Structs::CapabilityMinimaStruct::DecodableType &); +typedef void (*BasicGeneratedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BasicAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BasicAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BinaryInputBasicGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BinaryInputBasicAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BinaryInputBasicAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BindingBindingListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BindingGeneratedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BindingAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BindingAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanStateGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanStateAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanStateAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BridgedActionsActionListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*BridgedActionsEndpointListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*BridgedActionsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BridgedActionsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BridgedActionsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BridgedDeviceBasicGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BridgedDeviceBasicAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BridgedDeviceBasicAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ChannelChannelListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ChannelLineupStructAttributeCallback)( void *, const chip::app::DataModel::Nullable &); typedef void (*ChannelCurrentChannelStructAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*ChannelGeneratedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ChannelAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ChannelAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ColorControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ColorControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ColorControlAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ContentLauncherGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ContentLauncherAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ContentLauncherAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DescriptorDeviceListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*DescriptorServerListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*DescriptorClientListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*DescriptorPartsListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*DescriptorGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DescriptorAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DescriptorAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*DiagnosticLogsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DiagnosticLogsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DiagnosticLogsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DoorLockCredentialRulesSupportAttributeCallback)( + void *, chip::BitFlags); typedef void (*DoorLockSupportedOperatingModesAttributeCallback)( void *, chip::BitFlags); +typedef void (*DoorLockDefaultConfigurationRegisterAttributeCallback)( + void *, chip::BitFlags); +typedef void (*DoorLockLocalProgrammingFeaturesAttributeCallback)( + void *, chip::BitFlags); +typedef void (*DoorLockAlarmMaskAttributeCallback)(void *, chip::BitFlags); +typedef void (*DoorLockKeypadOperationEventMaskAttributeCallback)( + void *, chip::BitFlags); +typedef void (*DoorLockRemoteOperationEventMaskAttributeCallback)( + void *, chip::BitFlags); +typedef void (*DoorLockManualOperationEventMaskAttributeCallback)( + void *, chip::BitFlags); +typedef void (*DoorLockRFIDOperationEventMaskAttributeCallback)( + void *, chip::BitFlags); +typedef void (*DoorLockKeypadProgrammingEventMaskAttributeCallback)( + void *, chip::BitFlags); +typedef void (*DoorLockRemoteProgrammingEventMaskAttributeCallback)( + void *, chip::BitFlags); +typedef void (*DoorLockRFIDProgrammingEventMaskAttributeCallback)( + void *, chip::BitFlags); +typedef void (*DoorLockGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DoorLockAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*DoorLockAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ElectricalMeasurementGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ElectricalMeasurementAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ElectricalMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*EthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*EthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*EthernetNetworkDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FanControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FanControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FanControlAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*FixedLabelLabelListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*FixedLabelGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FixedLabelAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FixedLabelAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*FlowMeasurementGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FlowMeasurementAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FlowMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralCommissioningBasicCommissioningInfoStructAttributeCallback)( void *, const chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType &); +typedef void (*GeneralCommissioningGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralCommissioningAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralCommissioningAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsNetworkInterfacesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & data); +typedef void (*GeneralDiagnosticsActiveHardwareFaultsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsActiveRadioFaultsListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsActiveNetworkFaultsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GroupKeyManagementGroupKeyMapListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*GroupKeyManagementGroupTableListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*GroupKeyManagementGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GroupKeyManagementAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GroupKeyManagementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GroupsGeneratedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*GroupsAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*GroupsAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*IdentifyGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*IdentifyAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*IdentifyAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*IlluminanceMeasurementGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*IlluminanceMeasurementAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*IlluminanceMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*KeypadInputGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*KeypadInputAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*KeypadInputAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*LevelControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LevelControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LevelControlAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*LocalizationConfigurationSupportedLocalesListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LocalizationConfigurationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LocalizationConfigurationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LocalizationConfigurationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LowPowerGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LowPowerAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*LowPowerAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*MediaInputInputListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*MediaInputGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*MediaInputAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*MediaInputAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*MediaPlaybackSampledPositionStructAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*MediaPlaybackGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*MediaPlaybackAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*MediaPlaybackAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ModeSelectSupportedModesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ModeSelectGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ModeSelectAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*NetworkCommissioningNetworksListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*NetworkCommissioningGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*NetworkCommissioningAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*NetworkCommissioningAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OtaSoftwareUpdateProviderAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & data); +typedef void (*OtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OtaSoftwareUpdateRequestorAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OccupancySensingGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OccupancySensingAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OccupancySensingAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OnOffGeneratedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*OnOffAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*OnOffAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*OnOffSwitchConfigurationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OnOffSwitchConfigurationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OnOffSwitchConfigurationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OperationalCredentialsNOCsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*OperationalCredentialsFabricsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & data); +typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OperationalCredentialsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OperationalCredentialsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OperationalCredentialsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceActiveWiredFaultsListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceActiveBatteryFaultsListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceActiveBatteryChargeFaultsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceConfigurationSourcesListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceConfigurationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceConfigurationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceConfigurationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PressureMeasurementGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PressureMeasurementAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PressureMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PumpConfigurationAndControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PumpConfigurationAndControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PumpConfigurationAndControlAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RelativeHumidityMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ScenesGeneratedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ScenesAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ScenesAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*SoftwareDiagnosticsThreadMetricsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*SoftwareDiagnosticsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*SoftwareDiagnosticsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*SoftwareDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*SwitchGeneratedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*SwitchAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*SwitchAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*TargetNavigatorTargetListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*TargetNavigatorGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TargetNavigatorAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TargetNavigatorAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TemperatureMeasurementGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TemperatureMeasurementAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TemperatureMeasurementAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TestClusterBitmap8AttributeCallback)(void *, chip::BitFlags); typedef void (*TestClusterBitmap16AttributeCallback)(void *, chip::BitFlags); typedef void (*TestClusterBitmap32AttributeCallback)(void *, chip::BitFlags); typedef void (*TestClusterBitmap64AttributeCallback)(void *, chip::BitFlags); +typedef void (*TestClusterListInt8uListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*TestClusterListOctetStringListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*TestClusterListStructOctetStringListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*TestClusterListNullablesAndOptionalsStructListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & data); typedef void (*TestClusterStructAttrStructAttributeCallback)( void *, const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType &); +typedef void (*TestClusterListLongOctetStringListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TestClusterListFabricScopedListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*TestClusterNullableBitmap8AttributeCallback)( void *, const chip::app::DataModel::Nullable> &); typedef void (*TestClusterNullableBitmap16AttributeCallback)( @@ -610,9 +1097,92 @@ typedef void (*TestClusterNullableBitmap64AttributeCallback)( void *, const chip::app::DataModel::Nullable> &); typedef void (*TestClusterNullableStructStructAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*TestClusterGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TestClusterAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TestClusterAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThreadNetworkDiagnosticsNeighborTableListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & data); +typedef void (*ThreadNetworkDiagnosticsRouteTableListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*ThreadNetworkDiagnosticsSecurityPolicyListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType> & data); +typedef void (*ThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & data); +typedef void (*ThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThreadNetworkDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeFormatLocalizationSupportedCalendarTypesListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeFormatLocalizationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeFormatLocalizationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeFormatLocalizationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*UnitLocalizationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*UnitLocalizationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*UnitLocalizationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*UserLabelLabelListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*UserLabelGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*UserLabelAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*UserLabelAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*WakeOnLanGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WakeOnLanAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WakeOnLanAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*WiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WiFiNetworkDiagnosticsAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WindowCoveringConfigStatusAttributeCallback)(void *, chip::BitFlags); typedef void (*WindowCoveringModeAttributeCallback)(void *, chip::BitFlags); +typedef void (*WindowCoveringGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WindowCoveringAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WindowCoveringAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); class CHIPDefaultSuccessCallbackBridge : public CHIPCallbackBridge { @@ -3406,6 +3976,34 @@ class CHIPDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPDoorLockCredentialRulesSupportAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPDoorLockCredentialRulesSupportAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, chip::BitFlags value); +}; + +class CHIPDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge + : public CHIPDoorLockCredentialRulesSupportAttributeCallbackBridge +{ +public: + CHIPDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockCredentialRulesSupportAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPDoorLockSupportedOperatingModesAttributeCallbackBridge : public CHIPCallbackBridge { @@ -3434,25 +4032,25 @@ class CHIPDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitFlags value); }; -class CHIPDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge +class CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge + : public CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackBridge { public: - CHIPDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3462,25 +4060,25 @@ class CHIPDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitFlags value); }; -class CHIPDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge +class CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge + : public CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackBridge { public: - CHIPDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3490,23 +4088,23 @@ class CHIPDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPDoorLockAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +class CHIPDoorLockAlarmMaskAttributeCallbackBridge : public CHIPCallbackBridge { public: - CHIPDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPDoorLockAlarmMaskAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitFlags value); }; -class CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public CHIPDoorLockAttributeListListAttributeCallbackBridge +class CHIPDoorLockAlarmMaskAttributeCallbackSubscriptionBridge : public CHIPDoorLockAlarmMaskAttributeCallbackBridge { public: - CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPDoorLockAttributeListListAttributeCallbackBridge(queue, handler, action, true), + CHIPDoorLockAlarmMaskAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockAlarmMaskAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3516,26 +4114,25 @@ class CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockKeypadOperationEventMaskAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPDoorLockKeypadOperationEventMaskAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitFlags value); }; -class CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge +class CHIPDoorLockKeypadOperationEventMaskAttributeCallbackSubscriptionBridge + : public CHIPDoorLockKeypadOperationEventMaskAttributeCallbackBridge { public: - CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + CHIPDoorLockKeypadOperationEventMaskAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockKeypadOperationEventMaskAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3545,26 +4142,25 @@ class CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscrip SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockRemoteOperationEventMaskAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPDoorLockRemoteOperationEventMaskAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitFlags value); }; -class CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge +class CHIPDoorLockRemoteOperationEventMaskAttributeCallbackSubscriptionBridge + : public CHIPDoorLockRemoteOperationEventMaskAttributeCallbackBridge { public: - CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + CHIPDoorLockRemoteOperationEventMaskAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockRemoteOperationEventMaskAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3574,26 +4170,25 @@ class CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscript SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockManualOperationEventMaskAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPDoorLockManualOperationEventMaskAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitFlags value); }; -class CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge - : public CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge +class CHIPDoorLockManualOperationEventMaskAttributeCallbackSubscriptionBridge + : public CHIPDoorLockManualOperationEventMaskAttributeCallbackBridge { public: - CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action, true), + CHIPDoorLockManualOperationEventMaskAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockManualOperationEventMaskAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3603,26 +4198,25 @@ class CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBri SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockRFIDOperationEventMaskAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPDoorLockRFIDOperationEventMaskAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitFlags value); }; -class CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge +class CHIPDoorLockRFIDOperationEventMaskAttributeCallbackSubscriptionBridge + : public CHIPDoorLockRFIDOperationEventMaskAttributeCallbackBridge { public: - CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + CHIPDoorLockRFIDOperationEventMaskAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockRFIDOperationEventMaskAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3632,26 +4226,25 @@ class CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSub SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitFlags value); }; -class CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge +class CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackSubscriptionBridge + : public CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackBridge { public: - CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3661,26 +4254,25 @@ class CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubs SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitFlags value); }; -class CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge - : public CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge +class CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackSubscriptionBridge + : public CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackBridge { public: - CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3690,25 +4282,25 @@ class CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscripti SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPFanControlGeneratedCommandListListAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPFanControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, chip::BitFlags value); }; -class CHIPFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public CHIPFanControlGeneratedCommandListListAttributeCallbackBridge +class CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackSubscriptionBridge + : public CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackBridge { public: - CHIPFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPFanControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -3718,13 +4310,297 @@ class CHIPFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; -class CHIPFanControlAcceptedCommandListListAttributeCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge { public: - CHIPFanControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge +{ +public: + CHIPDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge +{ +public: + CHIPDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPDoorLockAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPDoorLockAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge : public CHIPDoorLockAttributeListListAttributeCallbackBridge +{ +public: + CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPDoorLockAttributeListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge +{ +public: + CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge +{ +public: + CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge + : public CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge +{ +public: + CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge +{ +public: + CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge +{ +public: + CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge + : public CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge +{ +public: + CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPFanControlGeneratedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPFanControlGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPFanControlGeneratedCommandListListAttributeCallbackBridge +{ +public: + CHIPFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPFanControlGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPFanControlAcceptedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPFanControlAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -4946,6 +5822,35 @@ class CHIPLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubsc SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPLocalizationConfigurationAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPLocalizationConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge + : public CHIPLocalizationConfigurationAttributeListListAttributeCallbackBridge +{ +public: + CHIPLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPLocalizationConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPLowPowerGeneratedCommandListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -5459,6 +6364,93 @@ class CHIPNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscripti SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge + : public CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge +{ +public: + CHIPNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -5519,6 +6511,64 @@ class CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubs SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -6264,6 +7314,64 @@ class CHIPPowerSourceConfigurationAttributeListListAttributeCallbackSubscription SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackBridge +{ +public: + CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackBridge +{ +public: + CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPPressureMeasurementAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -6864,6 +7972,64 @@ class CHIPTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge +{ +public: + CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge +{ +public: + CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -7413,17 +8579,73 @@ class CHIPTestClusterAttributeListListAttributeCallbackBridge bool keepAlive = false) : CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPTestClusterAttributeListListAttributeCallbackSubscriptionBridge + : public CHIPTestClusterAttributeListListAttributeCallbackBridge +{ +public: + CHIPTestClusterAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTestClusterAttributeListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPThermostatGeneratedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPThermostatGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPThermostatGeneratedCommandListListAttributeCallbackBridge +{ +public: + CHIPThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPThermostatGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPThermostatAcceptedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPThermostatAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class CHIPTestClusterAttributeListListAttributeCallbackSubscriptionBridge - : public CHIPTestClusterAttributeListListAttributeCallbackBridge +class CHIPThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPThermostatAcceptedCommandListListAttributeCallbackBridge { public: - CHIPTestClusterAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, - SubscriptionEstablishedHandler establishedHandler) : - CHIPTestClusterAttributeListListAttributeCallbackBridge(queue, handler, action, true), + CHIPThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPThermostatAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), mEstablishedHandler(establishedHandler) {} @@ -7888,6 +9110,93 @@ class CHIPTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscrip SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPTimeFormatLocalizationAttributeListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTimeFormatLocalizationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge + : public CHIPTimeFormatLocalizationAttributeListListAttributeCallbackBridge +{ +public: + CHIPTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTimeFormatLocalizationAttributeListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackBridge +{ +public: + CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackBridge +{ +public: + CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPUnitLocalizationAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -8000,6 +9309,33 @@ class CHIPUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPUserLabelAttributeListListAttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPUserLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class CHIPUserLabelAttributeListListAttributeCallbackSubscriptionBridge + : public CHIPUserLabelAttributeListListAttributeCallbackBridge +{ +public: + CHIPUserLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPUserLabelAttributeListListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPWakeOnLanGeneratedCommandListListAttributeCallbackBridge : public CHIPCallbackBridge { @@ -8372,40 +9708,40 @@ class CHIPDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & data); }; -class CHIPDoorLockClusterGetCredentialStatusResponseCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockClusterGetLogRecordResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPDoorLockClusterGetCredentialStatusResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPDoorLockClusterGetLogRecordResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data); + const chip::app::Clusters::DoorLock::Commands::GetLogRecordResponse::DecodableType & data); }; -class CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge - : public CHIPCallbackBridge +class CHIPDoorLockClusterGetPINCodeResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPDoorLockClusterGetPINCodeResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data); + const chip::app::Clusters::DoorLock::Commands::GetPINCodeResponse::DecodableType & data); }; -class CHIPDoorLockClusterGetUserResponseCallbackBridge : public CHIPCallbackBridge +class CHIPDoorLockClusterGetUserStatusResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPDoorLockClusterGetUserResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPDoorLockClusterGetUserStatusResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data); + static void OnSuccessFn(void * context, + const chip::app::Clusters::DoorLock::Commands::GetUserStatusResponse::DecodableType & data); }; class CHIPDoorLockClusterGetWeekDayScheduleResponseCallbackBridge @@ -8434,6 +9770,53 @@ class CHIPDoorLockClusterGetYearDayScheduleResponseCallbackBridge const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & data); }; +class CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data); +}; + +class CHIPDoorLockClusterGetUserTypeResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPDoorLockClusterGetUserTypeResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::DoorLock::Commands::GetUserTypeResponse::DecodableType & data); +}; + +class CHIPDoorLockClusterGetRFIDCodeResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPDoorLockClusterGetRFIDCodeResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::DoorLock::Commands::GetRFIDCodeResponse::DecodableType & data); +}; + +class CHIPDoorLockClusterGetUserResponseCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPDoorLockClusterGetUserResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data); +}; + class CHIPDoorLockClusterSetCredentialResponseCallbackBridge : public CHIPCallbackBridge { @@ -8446,6 +9829,19 @@ class CHIPDoorLockClusterSetCredentialResponseCallbackBridge const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & data); }; +class CHIPDoorLockClusterGetCredentialStatusResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPDoorLockClusterGetCredentialStatusResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data); +}; + class CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackBridge : public CHIPCallbackBridge { @@ -8459,20 +9855,6 @@ class CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackBridge const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data); }; -class CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge - : public CHIPCallbackBridge -{ -public: - CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data); -}; - class CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge : public CHIPCallbackBridge { @@ -8487,18 +9869,18 @@ class CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & data); }; -class CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge - : public CHIPCallbackBridge +class CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, - OnSuccessFn, keepAlive){}; + CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, + OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & data); + const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data); }; class CHIPGroupKeyManagementClusterKeySetReadResponseCallbackBridge @@ -8514,6 +9896,20 @@ class CHIPGroupKeyManagementClusterKeySetReadResponseCallbackBridge const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & data); }; +class CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, + OnSuccessFn, keepAlive){}; + + static void + OnSuccessFn(void * context, + const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & data); +}; + class CHIPGroupsClusterAddGroupResponseCallbackBridge : public CHIPCallbackBridge { public: @@ -8524,6 +9920,16 @@ class CHIPGroupsClusterAddGroupResponseCallbackBridge : public CHIPCallbackBridg static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data); }; +class CHIPGroupsClusterViewGroupResponseCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPGroupsClusterViewGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & data); +}; + class CHIPGroupsClusterGetGroupMembershipResponseCallbackBridge : public CHIPCallbackBridge { @@ -8548,16 +9954,6 @@ class CHIPGroupsClusterRemoveGroupResponseCallbackBridge static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data); }; -class CHIPGroupsClusterViewGroupResponseCallbackBridge : public CHIPCallbackBridge -{ -public: - CHIPGroupsClusterViewGroupResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & data); -}; - class CHIPIdentifyClusterIdentifyQueryResponseCallbackBridge : public CHIPCallbackBridge { @@ -8591,34 +9987,7 @@ class CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & data); -}; - -class CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackBridge - : public CHIPCallbackBridge -{ -public: - CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; - - static void - OnSuccessFn(void * context, - const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data); -}; - -class CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge - : public CHIPCallbackBridge -{ -public: - CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data); + const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & data); }; class CHIPNetworkCommissioningClusterScanNetworksResponseCallbackBridge @@ -8634,18 +10003,31 @@ class CHIPNetworkCommissioningClusterScanNetworksResponseCallbackBridge const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data); }; -class CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge - : public CHIPCallbackBridge +class CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data); +}; + +class CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data); + const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data); }; class CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge @@ -8662,6 +10044,20 @@ class CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & data); }; +class CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void + OnSuccessFn(void * context, + const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data); +}; + class CHIPOperationalCredentialsClusterAttestationResponseCallbackBridge : public CHIPCallbackBridge { @@ -8675,19 +10071,6 @@ class CHIPOperationalCredentialsClusterAttestationResponseCallbackBridge const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & data); }; -class CHIPOperationalCredentialsClusterCSRResponseCallbackBridge - : public CHIPCallbackBridge -{ -public: - CHIPOperationalCredentialsClusterCSRResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & data); -}; - class CHIPOperationalCredentialsClusterCertificateChainResponseCallbackBridge : public CHIPCallbackBridge { @@ -8702,6 +10085,19 @@ class CHIPOperationalCredentialsClusterCertificateChainResponseCallbackBridge const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & data); }; +class CHIPOperationalCredentialsClusterCSRResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOperationalCredentialsClusterCSRResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & data); +}; + class CHIPOperationalCredentialsClusterNOCResponseCallbackBridge : public CHIPCallbackBridge { @@ -8725,17 +10121,25 @@ class CHIPScenesClusterAddSceneResponseCallbackBridge : public CHIPCallbackBridg static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & data); }; -class CHIPScenesClusterGetSceneMembershipResponseCallbackBridge - : public CHIPCallbackBridge +class CHIPScenesClusterViewSceneResponseCallbackBridge : public CHIPCallbackBridge { public: - CHIPScenesClusterGetSceneMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPScenesClusterViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, - const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data); + static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data); +}; + +class CHIPScenesClusterRemoveSceneResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPScenesClusterRemoveSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data); }; class CHIPScenesClusterRemoveAllScenesResponseCallbackBridge @@ -8750,17 +10154,6 @@ class CHIPScenesClusterRemoveAllScenesResponseCallbackBridge const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data); }; -class CHIPScenesClusterRemoveSceneResponseCallbackBridge - : public CHIPCallbackBridge -{ -public: - CHIPScenesClusterRemoveSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - - static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data); -}; - class CHIPScenesClusterStoreSceneResponseCallbackBridge : public CHIPCallbackBridge { public: @@ -8771,14 +10164,52 @@ class CHIPScenesClusterStoreSceneResponseCallbackBridge : public CHIPCallbackBri static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & data); }; -class CHIPScenesClusterViewSceneResponseCallbackBridge : public CHIPCallbackBridge +class CHIPScenesClusterGetSceneMembershipResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPScenesClusterViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + CHIPScenesClusterGetSceneMembershipResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data); +}; + +class CHIPScenesClusterEnhancedAddSceneResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPScenesClusterEnhancedAddSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::DecodableType & data); +}; + +class CHIPScenesClusterEnhancedViewSceneResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPScenesClusterEnhancedViewSceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType & data); +}; + +class CHIPScenesClusterCopySceneResponseCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPScenesClusterCopySceneResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data); + static void OnSuccessFn(void * context, const chip::app::Clusters::Scenes::Commands::CopySceneResponse::DecodableType & data); }; class CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge @@ -8794,29 +10225,17 @@ class CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data); }; -class CHIPTestClusterClusterBooleanResponseCallbackBridge - : public CHIPCallbackBridge -{ -public: - CHIPTestClusterClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; - - static void OnSuccessFn(void * context, - const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & data); -}; - -class CHIPTestClusterClusterSimpleStructResponseCallbackBridge - : public CHIPCallbackBridge +class CHIPTestClusterClusterTestSpecificResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPTestClusterClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPTestClusterClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType & data); + const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & data); }; class CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge @@ -8832,29 +10251,31 @@ class CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge const chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType & data); }; -class CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge - : public CHIPCallbackBridge +class CHIPTestClusterClusterTestSimpleArgumentResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPTestClusterClusterTestSimpleArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data); + const chip::app::Clusters::TestCluster::Commands::TestSimpleArgumentResponse::DecodableType & data); }; -class CHIPTestClusterClusterTestEnumsResponseCallbackBridge - : public CHIPCallbackBridge +class CHIPTestClusterClusterTestStructArrayArgumentResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPTestClusterClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, - bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + CHIPTestClusterClusterTestStructArrayArgumentResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; - static void OnSuccessFn(void * context, - const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data); + static void + OnSuccessFn(void * context, + const chip::app::Clusters::TestCluster::Commands::TestStructArrayArgumentResponse::DecodableType & data); }; class CHIPTestClusterClusterTestListInt8UReverseResponseCallbackBridge @@ -8870,6 +10291,18 @@ class CHIPTestClusterClusterTestListInt8UReverseResponseCallbackBridge const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseResponse::DecodableType & data); }; +class CHIPTestClusterClusterTestEnumsResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTestClusterClusterTestEnumsResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::TestCluster::Commands::TestEnumsResponse::DecodableType & data); +}; + class CHIPTestClusterClusterTestNullableOptionalResponseCallbackBridge : public CHIPCallbackBridge { @@ -8883,30 +10316,70 @@ class CHIPTestClusterClusterTestNullableOptionalResponseCallbackBridge const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalResponse::DecodableType & data); }; -class CHIPTestClusterClusterTestSpecificResponseCallbackBridge - : public CHIPCallbackBridge +class CHIPTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPTestClusterClusterTestSpecificResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, + OnSuccessFn, keepAlive){}; + + static void + OnSuccessFn(void * context, + const chip::app::Clusters::TestCluster::Commands::TestComplexNullableOptionalResponse::DecodableType & data); +}; + +class CHIPTestClusterClusterBooleanResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTestClusterClusterBooleanResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::TestCluster::Commands::BooleanResponse::DecodableType & data); +}; + +class CHIPTestClusterClusterSimpleStructResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTestClusterClusterSimpleStructResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType & data); + const chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType & data); }; -class CHIPThermostatClusterGetRelayStatusLogResponseCallbackBridge - : public CHIPCallbackBridge +class CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge + : public CHIPCallbackBridge { public: - CHIPThermostatClusterGetRelayStatusLogResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - CHIPActionBlock action, bool keepAlive = false) : - CHIPCallbackBridge(queue, handler, action, OnSuccessFn, - keepAlive){}; + CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; static void OnSuccessFn(void * context, - const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & data); + const chip::app::Clusters::TestCluster::Commands::TestEmitTestEventResponse::DecodableType & data); +}; + +class CHIPTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, + OnSuccessFn, keepAlive){}; + + static void + OnSuccessFn(void * context, + const chip::app::Clusters::TestCluster::Commands::TestEmitTestFabricScopedEventResponse::DecodableType & data); }; class CHIPThermostatClusterGetWeeklyScheduleResponseCallbackBridge @@ -8922,6 +10395,19 @@ class CHIPThermostatClusterGetWeeklyScheduleResponseCallbackBridge const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & data); }; +class CHIPThermostatClusterGetRelayStatusLogResponseCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPThermostatClusterGetRelayStatusLogResponseCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, + keepAlive){}; + + static void OnSuccessFn(void * context, + const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & data); +}; + class CHIPIdentifyClusterIdentifyEffectIdentifierAttributeCallbackBridge : public CHIPCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index e5ea3a0c4c849c..f1dab3c740d003 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -192,6 +192,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -282,6 +299,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -308,10 +342,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPAdministratorCommissioning : CHIPCluster -- (void)openBasicCommissioningWindowWithParams:(CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params - completionHandler:(StatusCompletion)completionHandler; - (void)openCommissioningWindowWithParams:(CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)openBasicCommissioningWindowWithParams:(CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)revokeCommissioningWithParams:(CHIPAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)revokeCommissioningWithCompletionHandler:(StatusCompletion)completionHandler; @@ -426,6 +460,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -647,6 +698,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -673,15 +741,15 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPApplicationLauncher : CHIPCluster -- (void)hideAppWithParams:(CHIPApplicationLauncherClusterHideAppParams *)params - completionHandler:(void (^)(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; - (void)launchAppWithParams:(CHIPApplicationLauncherClusterLaunchAppParams *)params completionHandler:(void (^)(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; - (void)stopAppWithParams:(CHIPApplicationLauncherClusterStopAppParams *)params completionHandler:(void (^)(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)hideAppWithParams:(CHIPApplicationLauncherClusterHideAppParams *)params + completionHandler:(void (^)(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)readAttributeCatalogListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -779,6 +847,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -805,10 +890,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPAudioOutput : CHIPCluster -- (void)renameOutputWithParams:(CHIPAudioOutputClusterRenameOutputParams *)params - completionHandler:(StatusCompletion)completionHandler; - (void)selectOutputWithParams:(CHIPAudioOutputClusterSelectOutputParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)renameOutputWithParams:(CHIPAudioOutputClusterRenameOutputParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)readAttributeOutputListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -900,6 +985,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -988,6 +1090,142 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBarrierOpenEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBarrierCloseEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBarrierClosePeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -1062,6 +1300,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -1088,6 +1343,10 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPBasic : CHIPCluster +- (void)mfgSpecificPingWithParams:(CHIPBasicClusterMfgSpecificPingParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)mfgSpecificPingWithCompletionHandler:(StatusCompletion)completionHandler; + - (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -1503,6 +1762,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -1529,10 +1805,74 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPBinaryInputBasic : CHIPCluster -- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value +- (void)readAttributeActiveTextWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActiveTextWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInactiveTextWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; /** @@ -1551,6 +1891,22 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePolarityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePolarityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributePresentValueWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -1573,6 +1929,27 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeReliabilityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeReliabilityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -1590,6 +1967,24 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeApplicationTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -1646,6 +2041,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -1748,6 +2160,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -1847,6 +2276,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -1873,30 +2319,30 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPBridgedActions : CHIPCluster -- (void)disableActionWithParams:(CHIPBridgedActionsClusterDisableActionParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)disableActionWithDurationWithParams:(CHIPBridgedActionsClusterDisableActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)enableActionWithParams:(CHIPBridgedActionsClusterEnableActionParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)enableActionWithDurationWithParams:(CHIPBridgedActionsClusterEnableActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler; - (void)instantActionWithParams:(CHIPBridgedActionsClusterInstantActionParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)instantActionWithTransitionWithParams:(CHIPBridgedActionsClusterInstantActionWithTransitionParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)pauseActionWithParams:(CHIPBridgedActionsClusterPauseActionParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)pauseActionWithDurationWithParams:(CHIPBridgedActionsClusterPauseActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)resumeActionWithParams:(CHIPBridgedActionsClusterResumeActionParams *)params - completionHandler:(StatusCompletion)completionHandler; - (void)startActionWithParams:(CHIPBridgedActionsClusterStartActionParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)startActionWithDurationWithParams:(CHIPBridgedActionsClusterStartActionWithDurationParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)stopActionWithParams:(CHIPBridgedActionsClusterStopActionParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)pauseActionWithParams:(CHIPBridgedActionsClusterPauseActionParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)pauseActionWithDurationWithParams:(CHIPBridgedActionsClusterPauseActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)resumeActionWithParams:(CHIPBridgedActionsClusterResumeActionParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)enableActionWithParams:(CHIPBridgedActionsClusterEnableActionParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)enableActionWithDurationWithParams:(CHIPBridgedActionsClusterEnableActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)disableActionWithParams:(CHIPBridgedActionsClusterDisableActionParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)disableActionWithDurationWithParams:(CHIPBridgedActionsClusterDisableActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)readAttributeActionListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -2003,6 +2449,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -2349,6 +2812,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -2491,6 +2971,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -2517,39 +3014,39 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPColorControl : CHIPCluster -- (void)colorLoopSetWithParams:(CHIPColorControlClusterColorLoopSetParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)enhancedMoveHueWithParams:(CHIPColorControlClusterEnhancedMoveHueParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)enhancedMoveToHueWithParams:(CHIPColorControlClusterEnhancedMoveToHueParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)enhancedMoveToHueAndSaturationWithParams:(CHIPColorControlClusterEnhancedMoveToHueAndSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)enhancedStepHueWithParams:(CHIPColorControlClusterEnhancedStepHueParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)moveColorWithParams:(CHIPColorControlClusterMoveColorParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)moveColorTemperatureWithParams:(CHIPColorControlClusterMoveColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler; +- (void)moveToHueWithParams:(CHIPColorControlClusterMoveToHueParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)moveHueWithParams:(CHIPColorControlClusterMoveHueParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)stepHueWithParams:(CHIPColorControlClusterStepHueParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)moveToSaturationWithParams:(CHIPColorControlClusterMoveToSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)moveSaturationWithParams:(CHIPColorControlClusterMoveSaturationParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)stepSaturationWithParams:(CHIPColorControlClusterStepSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)moveToHueAndSaturationWithParams:(CHIPColorControlClusterMoveToHueAndSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)moveToColorWithParams:(CHIPColorControlClusterMoveToColorParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)moveColorWithParams:(CHIPColorControlClusterMoveColorParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)stepColorWithParams:(CHIPColorControlClusterStepColorParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)moveToColorTemperatureWithParams:(CHIPColorControlClusterMoveToColorTemperatureParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)moveToHueWithParams:(CHIPColorControlClusterMoveToHueParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)moveToHueAndSaturationWithParams:(CHIPColorControlClusterMoveToHueAndSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)moveToSaturationWithParams:(CHIPColorControlClusterMoveToSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)stepColorWithParams:(CHIPColorControlClusterStepColorParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stepColorTemperatureWithParams:(CHIPColorControlClusterStepColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)stepHueWithParams:(CHIPColorControlClusterStepHueParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stepSaturationWithParams:(CHIPColorControlClusterStepSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler; +- (void)enhancedMoveToHueWithParams:(CHIPColorControlClusterEnhancedMoveToHueParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)enhancedMoveHueWithParams:(CHIPColorControlClusterEnhancedMoveHueParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)enhancedStepHueWithParams:(CHIPColorControlClusterEnhancedStepHueParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)enhancedMoveToHueAndSaturationWithParams:(CHIPColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)colorLoopSetWithParams:(CHIPColorControlClusterColorLoopSetParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)stopMoveStepWithParams:(CHIPColorControlClusterStopMoveStepParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)moveColorTemperatureWithParams:(CHIPColorControlClusterMoveColorTemperatureParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stepColorTemperatureWithParams:(CHIPColorControlClusterStepColorTemperatureParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -3576,6 +4073,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -3706,6 +4220,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -3852,6 +4383,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -3938,6 +4486,41 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + @end /** @@ -3946,46 +4529,80 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPDoorLock : CHIPCluster -- (void)clearCredentialWithParams:(CHIPDoorLockClusterClearCredentialParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)clearHolidayScheduleWithParams:(CHIPDoorLockClusterClearHolidayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)clearUserWithParams:(CHIPDoorLockClusterClearUserParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)lockDoorWithParams:(CHIPDoorLockClusterLockDoorParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)unlockDoorWithParams:(CHIPDoorLockClusterUnlockDoorParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)unlockWithTimeoutWithParams:(CHIPDoorLockClusterUnlockWithTimeoutParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getLogRecordWithParams:(CHIPDoorLockClusterGetLogRecordParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetLogRecordResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)setPINCodeWithParams:(CHIPDoorLockClusterSetPINCodeParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)getPINCodeWithParams:(CHIPDoorLockClusterGetPINCodeParams *)params + completionHandler: + (void (^)(CHIPDoorLockClusterGetPINCodeResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)clearPINCodeWithParams:(CHIPDoorLockClusterClearPINCodeParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)clearAllPINCodesWithParams:(CHIPDoorLockClusterClearAllPINCodesParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)clearAllPINCodesWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)setUserStatusWithParams:(CHIPDoorLockClusterSetUserStatusParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getUserStatusWithParams:(CHIPDoorLockClusterGetUserStatusParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetUserStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)setWeekDayScheduleWithParams:(CHIPDoorLockClusterSetWeekDayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getWeekDayScheduleWithParams:(CHIPDoorLockClusterGetWeekDayScheduleParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)clearWeekDayScheduleWithParams:(CHIPDoorLockClusterClearWeekDayScheduleParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)setYearDayScheduleWithParams:(CHIPDoorLockClusterSetYearDayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getYearDayScheduleWithParams:(CHIPDoorLockClusterGetYearDayScheduleParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; - (void)clearYearDayScheduleWithParams:(CHIPDoorLockClusterClearYearDayScheduleParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)getCredentialStatusWithParams:(CHIPDoorLockClusterGetCredentialStatusParams *)params - completionHandler:(void (^)(CHIPDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; +- (void)setHolidayScheduleWithParams:(CHIPDoorLockClusterSetHolidayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)getHolidayScheduleWithParams:(CHIPDoorLockClusterGetHolidayScheduleParams *)params completionHandler:(void (^)(CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)clearHolidayScheduleWithParams:(CHIPDoorLockClusterClearHolidayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)setUserTypeWithParams:(CHIPDoorLockClusterSetUserTypeParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)getUserTypeWithParams:(CHIPDoorLockClusterGetUserTypeParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetUserTypeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)setRFIDCodeWithParams:(CHIPDoorLockClusterSetRFIDCodeParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)getRFIDCodeWithParams:(CHIPDoorLockClusterGetRFIDCodeParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetRFIDCodeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)clearRFIDCodeWithParams:(CHIPDoorLockClusterClearRFIDCodeParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)clearAllRFIDCodesWithParams:(CHIPDoorLockClusterClearAllRFIDCodesParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)clearAllRFIDCodesWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)setUserWithParams:(CHIPDoorLockClusterSetUserParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)getUserWithParams:(CHIPDoorLockClusterGetUserParams *)params completionHandler: (void (^)(CHIPDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)getWeekDayScheduleWithParams:(CHIPDoorLockClusterGetWeekDayScheduleParams *)params - completionHandler:(void (^)(CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)getYearDayScheduleWithParams:(CHIPDoorLockClusterGetYearDayScheduleParams *)params - completionHandler:(void (^)(CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)lockDoorWithParams:(CHIPDoorLockClusterLockDoorParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)clearUserWithParams:(CHIPDoorLockClusterClearUserParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)setCredentialWithParams:(CHIPDoorLockClusterSetCredentialParams *)params completionHandler:(void (^)(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)setHolidayScheduleWithParams:(CHIPDoorLockClusterSetHolidayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)setUserWithParams:(CHIPDoorLockClusterSetUserParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)setWeekDayScheduleWithParams:(CHIPDoorLockClusterSetWeekDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)setYearDayScheduleWithParams:(CHIPDoorLockClusterSetYearDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)unlockDoorWithParams:(CHIPDoorLockClusterUnlockDoorParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)unlockWithTimeoutWithParams:(CHIPDoorLockClusterUnlockWithTimeoutParams *)params - completionHandler:(StatusCompletion)completionHandler; +- (void)getCredentialStatusWithParams:(CHIPDoorLockClusterGetCredentialStatusParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)clearCredentialWithParams:(CHIPDoorLockClusterClearCredentialParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)operatingEventNotificationWithParams:(CHIPDoorLockClusterOperatingEventNotificationParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)programmingEventNotificationWithParams:(CHIPDoorLockClusterProgrammingEventNotificationParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)readAttributeLockStateWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -4053,6 +4670,90 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDoorOpenEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDoorClosedEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOpenPeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNumberOfLogRecordsSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNumberOfLogRecordsSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNumberOfLogRecordsSupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + - (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -4241,25 +4942,87 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLanguageWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLanguageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeCredentialRulesSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeEnableLoggingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnableLoggingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEnableLoggingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeEnableLoggingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeEnableLoggingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLanguageWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLanguageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLEDSettingsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; @@ -4345,6 +5108,49 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value @@ -4369,6 +5175,30 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value @@ -4393,6 +5223,30 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + - (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @@ -4440,6 +5294,28 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSendPINOverTheAirWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value @@ -4447,283 +5323,233 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeAlarmMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAlarmMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAlarmMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAlarmMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeKeypadOperationEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeKeypadOperationEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeKeypadOperationEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end +- (void)subscribeAttributeKeypadOperationEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeKeypadOperationEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeRemoteOperationEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRemoteOperationEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRemoteOperationEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** - * Cluster Electrical Measurement - * + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. */ -@interface CHIPElectricalMeasurement : CHIPCluster +- (void)subscribeAttributeRemoteOperationEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRemoteOperationEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeManualOperationEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeManualOperationEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeManualOperationEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasurementTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTotalActivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsVoltageMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeManualOperationEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeManualOperationEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRFIDOperationEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRFIDOperationEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRFIDOperationEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRmsCurrentMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRFIDOperationEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRFIDOperationEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeKeypadProgrammingEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeKeypadProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeKeypadProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeKeypadProgrammingEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeKeypadProgrammingEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRemoteProgrammingEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRemoteProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRemoteProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRemoteProgrammingEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRemoteProgrammingEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRFIDProgrammingEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRFIDProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRFIDProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActivePowerMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRFIDProgrammingEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRFIDProgrammingEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -4781,6 +5607,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -4802,2212 +5645,2417 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Ethernet Network Diagnostics + * Cluster Electrical Measurement * */ -@interface CHIPEthernetNetworkDiagnostics : CHIPCluster +@interface CHIPElectricalMeasurement : CHIPCluster -- (void)resetCountsWithParams:(CHIPEthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)getProfileInfoCommandWithParams:(CHIPElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getProfileInfoCommandWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)getMeasurementProfileCommandWithParams:(CHIPElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params + completionHandler:(StatusCompletion)completionHandler; -- (void)readAttributePHYRateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePHYRateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasurementTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFullDuplexWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePacketRxCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcVoltageMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePacketTxCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcVoltageMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTxErrCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCollisionCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcCurrentMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( +- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOverrunCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeDcCurrentMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcPowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCarrierDetectWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcPowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTimeSinceResetWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcPowerMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcPowerMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcVoltageDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end +- (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcCurrentDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Fan Control - * + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. */ -@interface CHIPFanControl : CHIPCluster +- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcPowerMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFanModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFanModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDcPowerDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFanModeSequenceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePercentSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAcFrequencyMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePercentCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAcFrequencyMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSpeedMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNeutralCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSpeedSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeTotalActivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSpeedCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeTotalReactivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRockSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeTotalApparentPowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRockSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWindSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWindSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end +- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Fixed Label - * + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. */ -@interface CHIPFixedLabel : CHIPCluster +- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeLabelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLabelListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePowerMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -@end - -/** - * Cluster Flow Measurement - * - */ -@interface CHIPFlowMeasurement : CHIPCluster - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePowerDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInstantaneousVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end +- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster General Commissioning - * + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. */ -@interface CHIPGeneralCommissioning : CHIPCluster - -- (void)armFailSafeWithParams:(CHIPGeneralCommissioningClusterArmFailSafeParams *)params - completionHandler:(void (^)(CHIPGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)commissioningCompleteWithParams:(CHIPGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params - completionHandler: - (void (^)(CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)commissioningCompleteWithCompletionHandler: - (void (^)(CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)setRegulatoryConfigWithParams:(CHIPGeneralCommissioningClusterSetRegulatoryConfigParams *)params - completionHandler:(void (^)(CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInstantaneousPowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)( +- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBreadcrumbWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRmsVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBasicCommissioningInfoWithCompletionHandler: - (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void) - subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))completionHandler; - -- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRegulatoryConfigWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLocationCapabilityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsCurrentMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsCurrentMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -@end +- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActivePowerMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster General Diagnostics - * + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. */ -@interface CHIPGeneralDiagnostics : CHIPCluster +- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActivePowerMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNetworkInterfacesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeReactivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRebootCountWithCompletionHandler:(void (^)( +- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeApparentPowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributePowerFactorWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRebootCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePowerFactorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUpTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTotalOperationalHoursWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBootReasonsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveRadioFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcVoltageDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcCurrentDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcPowerMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcPowerDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeVoltageOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -@end - -/** - * Cluster Group Key Management - * - */ -@interface CHIPGroupKeyManagement : CHIPCluster - -- (void)keySetReadWithParams:(CHIPGroupKeyManagementClusterKeySetReadParams *)params - completionHandler:(void (^)(CHIPGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)keySetReadAllIndicesWithParams:(CHIPGroupKeyManagementClusterKeySetReadAllIndicesParams *)params - completionHandler:(void (^)(CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)keySetRemoveWithParams:(CHIPGroupKeyManagementClusterKeySetRemoveParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)keySetWriteWithParams:(CHIPGroupKeyManagementClusterKeySetWriteParams *)params - completionHandler:(StatusCompletion)completionHandler; - -- (void)readAttributeGroupKeyMapWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGroupKeyMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGroupTableWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGroupTableWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcVoltageOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcCurrentOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageSagWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRmsVoltageSwellWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -@end - +- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Groups - * + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. */ -@interface CHIPGroups : CHIPCluster - -- (void)addGroupWithParams:(CHIPGroupsClusterAddGroupParams *)params - completionHandler: - (void (^)(CHIPGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)addGroupIfIdentifyingWithParams:(CHIPGroupsClusterAddGroupIfIdentifyingParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)getGroupMembershipWithParams:(CHIPGroupsClusterGetGroupMembershipParams *)params - completionHandler:(void (^)(CHIPGroupsClusterGetGroupMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)removeAllGroupsWithParams:(CHIPGroupsClusterRemoveAllGroupsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)removeAllGroupsWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)removeGroupWithParams:(CHIPGroupsClusterRemoveGroupParams *)params - completionHandler: - (void (^)(CHIPGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)viewGroupWithParams:(CHIPGroupsClusterViewGroupParams *)params - completionHandler: - (void (^)(CHIPGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNameSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end +- (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** - * Cluster Identify - * + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. */ -@interface CHIPIdentify : CHIPCluster +- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)identifyWithParams:(CHIPIdentifyClusterIdentifyParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)identifyQueryWithParams:(CHIPIdentifyClusterIdentifyQueryParams * _Nullable)params - completionHandler:(void (^)(CHIPIdentifyClusterIdentifyQueryResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)identifyQueryWithCompletionHandler:(void (^)(CHIPIdentifyClusterIdentifyQueryResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)triggerEffectWithParams:(CHIPIdentifyClusterTriggerEffectParams *)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeIdentifyTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActivePowerPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeIdentifyTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end - -/** - * Cluster Illuminance Measurement - * - */ -@interface CHIPIlluminanceMeasurement : CHIPCluster +- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePowerFactorPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLightSensorTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end - -/** - * Cluster Keypad Input - * - */ -@interface CHIPKeypadInput : CHIPCluster - -- (void)sendKeyWithParams:(CHIPKeypadInputClusterSendKeyParams *)params - completionHandler: - (void (^)(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end - -/** - * Cluster Level Control - * - */ -@interface CHIPLevelControl : CHIPCluster - -- (void)moveWithParams:(CHIPLevelControlClusterMoveParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)moveToLevelWithParams:(CHIPLevelControlClusterMoveToLevelParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)moveToLevelWithOnOffWithParams:(CHIPLevelControlClusterMoveToLevelWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)moveWithOnOffWithParams:(CHIPLevelControlClusterMoveWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)stepWithParams:(CHIPLevelControlClusterStepParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stepWithOnOffWithParams:(CHIPLevelControlClusterStepWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)stopWithParams:(CHIPLevelControlClusterStopParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stopWithOnOffWithParams:(CHIPLevelControlClusterStopWithOnOffParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)stopWithOnOffWithCompletionHandler:(StatusCompletion)completionHandler; - -- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRemainingTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActivePowerPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOptionsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOptionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnOffTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOnLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePowerFactorPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOffTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDefaultMoveRateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartUpCurrentLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -7103,244 +8151,172 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Localization Configuration + * Cluster Ethernet Network Diagnostics * */ -@interface CHIPLocalizationConfiguration : CHIPCluster +@interface CHIPEthernetNetworkDiagnostics : CHIPCluster -- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)resetCountsWithParams:(CHIPEthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributePHYRateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveLocaleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePHYRateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportedLocalesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFullDuplexWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePacketRxCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePacketTxCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end - -/** - * Cluster Low Power - * - */ -@interface CHIPLowPower : CHIPCluster - -- (void)sleepWithParams:(CHIPLowPowerClusterSleepParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; -- (void)sleepWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeTxErrCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCollisionCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOverrunCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCarrierDetectWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end - -/** - * Cluster Media Input - * - */ -@interface CHIPMediaInput : CHIPCluster - -- (void)hideInputStatusWithParams:(CHIPMediaInputClusterHideInputStatusParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)hideInputStatusWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)renameInputWithParams:(CHIPMediaInputClusterRenameInputParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)selectInputWithParams:(CHIPMediaInputClusterSelectInputParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)showInputStatusWithParams:(CHIPMediaInputClusterShowInputStatusParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)showInputStatusWithCompletionHandler:(StatusCompletion)completionHandler; - -- (void)readAttributeInputListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInputListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentInputWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeTimeSinceResetWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -7398,6 +8374,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -7419,182 +8412,224 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Media Playback + * Cluster Fan Control * */ -@interface CHIPMediaPlayback : CHIPCluster - -- (void)fastForwardWithParams:(CHIPMediaPlaybackClusterFastForwardParams * _Nullable)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)fastForwardWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)nextWithParams:(CHIPMediaPlaybackClusterNextParams * _Nullable)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)nextWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)pauseWithParams:(CHIPMediaPlaybackClusterPauseParams * _Nullable)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)pauseWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)playWithParams:(CHIPMediaPlaybackClusterPlayParams * _Nullable)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)playWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)previousWithParams:(CHIPMediaPlaybackClusterPreviousParams * _Nullable)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)previousWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)rewindWithParams:(CHIPMediaPlaybackClusterRewindParams * _Nullable)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)rewindWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)seekWithParams:(CHIPMediaPlaybackClusterSeekParams *)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)skipBackwardWithParams:(CHIPMediaPlaybackClusterSkipBackwardParams *)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)skipForwardWithParams:(CHIPMediaPlaybackClusterSkipForwardParams *)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)startOverWithParams:(CHIPMediaPlaybackClusterStartOverParams * _Nullable)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)startOverWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)stopPlaybackWithParams:(CHIPMediaPlaybackClusterStopPlaybackParams * _Nullable)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)stopPlaybackWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; +@interface CHIPFanControl : CHIPCluster -- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFanModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFanModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeStartTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFanModeSequenceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeDurationWithCompletionHandler:(void (^)( +- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePercentSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePercentCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDurationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSpeedMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeSampledPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completionHandler; - -- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePlaybackSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSpeedSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( +- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSeekRangeEndWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSpeedCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSeekRangeStartWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRockSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRockSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeWindSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeWindSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -7652,6 +8687,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -7673,123 +8725,26 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Mode Select + * Cluster Fixed Label * */ -@interface CHIPModeSelect : CHIPCluster - -- (void)changeToModeWithParams:(CHIPModeSelectClusterChangeToModeParams *)params - completionHandler:(StatusCompletion)completionHandler; +@interface CHIPFixedLabel : CHIPCluster -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeLabelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStandardNamespaceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportedModesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartUpModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLabelListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -7885,176 +8840,290 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Network Commissioning + * Cluster Flow Measurement * */ -@interface CHIPNetworkCommissioning : CHIPCluster - -- (void)addOrUpdateThreadNetworkWithParams:(CHIPNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)addOrUpdateWiFiNetworkWithParams:(CHIPNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)connectNetworkWithParams:(CHIPNetworkCommissioningClusterConnectNetworkParams *)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)removeNetworkWithParams:(CHIPNetworkCommissioningClusterRemoveNetworkParams *)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)reorderNetworkWithParams:(CHIPNetworkCommissioningClusterReorderNetworkParams *)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)scanNetworksWithParams:(CHIPNetworkCommissioningClusterScanNetworksParams * _Nullable)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; - -- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxNetworksWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeNetworksWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNetworksWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +@interface CHIPFlowMeasurement : CHIPCluster -- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInterfaceEnabledWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLastNetworkingStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLastNetworkIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLastConnectErrorValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster General Commissioning + * + */ +@interface CHIPGeneralCommissioning : CHIPCluster + +- (void)armFailSafeWithParams:(CHIPGeneralCommissioningClusterArmFailSafeParams *)params + completionHandler:(void (^)(CHIPGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)setRegulatoryConfigWithParams:(CHIPGeneralCommissioningClusterSetRegulatoryConfigParams *)params + completionHandler:(void (^)(CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)commissioningCompleteWithParams:(CHIPGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params + completionHandler: + (void (^)(CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)commissioningCompleteWithCompletionHandler: + (void (^)(CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBreadcrumbWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeBasicCommissioningInfoWithCompletionHandler: + (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void) + subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRegulatoryConfigWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLocationCapabilityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -8094,6 +9163,24 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -8132,242 +9219,152 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster OTA Software Update Provider + * Cluster General Diagnostics * */ -@interface CHIPOtaSoftwareUpdateProvider : CHIPCluster - -- (void)applyUpdateRequestWithParams:(CHIPOtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params - completionHandler:(void (^)(CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)notifyUpdateAppliedWithParams:(CHIPOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)queryImageWithParams:(CHIPOtaSoftwareUpdateProviderClusterQueryImageParams *)params - completionHandler:(void (^)(CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; +@interface CHIPGeneralDiagnostics : CHIPCluster -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNetworkInterfacesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRebootCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end - -/** - * Cluster OTA Software Update Requestor - * - */ -@interface CHIPOtaSoftwareUpdateRequestor : CHIPCluster - -- (void)announceOtaProviderWithParams:(CHIPOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params - completionHandler:(StatusCompletion)completionHandler; - -- (void)readAttributeDefaultOtaProvidersWithParams:(CHIPReadParams * _Nullable)params +- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRebootCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeUpTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUpdatePossibleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeTotalOperationalHoursWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)( +- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUpdateStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBootReasonsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUpdateStateProgressWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end - -/** - * Cluster Occupancy Sensing - * - */ -@interface CHIPOccupancySensing : CHIPCluster +- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupancyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActiveRadioFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupancySensorTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -8425,6 +9422,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -8446,118 +9460,95 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster On/Off + * Cluster Group Key Management * */ -@interface CHIPOnOff : CHIPCluster - -- (void)offWithParams:(CHIPOnOffClusterOffParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; -- (void)offWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)offWithEffectWithParams:(CHIPOnOffClusterOffWithEffectParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)onWithParams:(CHIPOnOffClusterOnParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; -- (void)onWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)onWithRecallGlobalSceneWithParams:(CHIPOnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)onWithRecallGlobalSceneWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)onWithTimedOffWithParams:(CHIPOnOffClusterOnWithTimedOffParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)toggleWithParams:(CHIPOnOffClusterToggleParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; -- (void)toggleWithCompletionHandler:(StatusCompletion)completionHandler; +@interface CHIPGroupKeyManagement : CHIPCluster -- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. +- (void)keySetWriteWithParams:(CHIPGroupKeyManagementClusterKeySetWriteParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)keySetReadWithParams:(CHIPGroupKeyManagementClusterKeySetReadParams *)params + completionHandler:(void (^)(CHIPGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)keySetRemoveWithParams:(CHIPGroupKeyManagementClusterKeySetRemoveParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)keySetReadAllIndicesWithParams:(CHIPGroupKeyManagementClusterKeySetReadAllIndicesParams *)params + completionHandler:(void (^)(CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeGroupKeyMapWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. */ -- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnOffWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGroupKeyMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeGroupTableWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGroupTableWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGlobalSceneControlWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOnTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOffWaitTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartUpOnOffWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -8653,49 +9644,45 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster On/off Switch Configuration + * Cluster Groups * */ -@interface CHIPOnOffSwitchConfiguration : CHIPCluster +@interface CHIPGroups : CHIPCluster -- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSwitchTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)addGroupWithParams:(CHIPGroupsClusterAddGroupParams *)params + completionHandler: + (void (^)(CHIPGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)viewGroupWithParams:(CHIPGroupsClusterViewGroupParams *)params + completionHandler: + (void (^)(CHIPGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)getGroupMembershipWithParams:(CHIPGroupsClusterGetGroupMembershipParams *)params + completionHandler:(void (^)(CHIPGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)removeGroupWithParams:(CHIPGroupsClusterRemoveGroupParams *)params + completionHandler: + (void (^)(CHIPGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)removeAllGroupsWithParams:(CHIPGroupsClusterRemoveAllGroupsParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)removeAllGroupsWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)addGroupIfIdentifyingWithParams:(CHIPGroupsClusterAddGroupIfIdentifyingParams *)params + completionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSwitchActionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNameSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -8753,6 +9740,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -8774,143 +9778,59 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Operational Credentials + * Cluster Identify * */ -@interface CHIPOperationalCredentials : CHIPCluster +@interface CHIPIdentify : CHIPCluster -- (void)addNOCWithParams:(CHIPOperationalCredentialsClusterAddNOCParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)addTrustedRootCertificateWithParams:(CHIPOperationalCredentialsClusterAddTrustedRootCertificateParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)attestationRequestWithParams:(CHIPOperationalCredentialsClusterAttestationRequestParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)CSRRequestWithParams:(CHIPOperationalCredentialsClusterCSRRequestParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)certificateChainRequestWithParams:(CHIPOperationalCredentialsClusterCertificateChainRequestParams *)params - completionHandler: - (void (^)(CHIPOperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)removeFabricWithParams:(CHIPOperationalCredentialsClusterRemoveFabricParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)removeTrustedRootCertificateWithParams:(CHIPOperationalCredentialsClusterRemoveTrustedRootCertificateParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)updateFabricLabelWithParams:(CHIPOperationalCredentialsClusterUpdateFabricLabelParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)updateNOCWithParams:(CHIPOperationalCredentialsClusterUpdateNOCParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; +- (void)identifyWithParams:(CHIPIdentifyClusterIdentifyParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)identifyQueryWithParams:(CHIPIdentifyClusterIdentifyQueryParams * _Nullable)params + completionHandler:(void (^)(CHIPIdentifyClusterIdentifyQueryResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)identifyQueryWithCompletionHandler:(void (^)(CHIPIdentifyClusterIdentifyQueryResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)triggerEffectWithParams:(CHIPIdentifyClusterTriggerEffectParams *)params + completionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeNOCsWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNOCsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeFabricsWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSupportedFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCommissionedFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeIdentifyTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentFabricIndexWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeIdentifyTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -8968,6 +9888,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -8989,580 +9926,590 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Power Source + * Cluster Illuminance Measurement * */ -@interface CHIPPowerSource : CHIPCluster - -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOrderWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +@interface CHIPIlluminanceMeasurement : CHIPCluster -- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredCurrentTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLightSensorTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredNominalVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeWiredPresentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveWiredFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeBatteryVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +@end -- (void)readAttributeBatteryPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; /** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. + * Cluster Keypad Input + * */ -- (void)subscribeAttributeBatteryPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryPercentRemainingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +@interface CHIPKeypadInput : CHIPCluster -- (void)readAttributeBatteryTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)sendKeyWithParams:(CHIPKeypadInputClusterSendKeyParams *)params + completionHandler: + (void (^)(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryTimeRemainingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryChargeLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryReplacementNeededWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryReplaceabilityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeBatteryPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeBatteryPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryPresentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveBatteryFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeActiveBatteryFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveBatteryFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end -- (void)readAttributeBatteryReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; /** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. + * Cluster Level Control + * */ -- (void)subscribeAttributeBatteryReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryReplacementDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +@interface CHIPLevelControl : CHIPCluster -- (void)readAttributeBatteryCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)moveToLevelWithParams:(CHIPLevelControlClusterMoveToLevelParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)moveWithParams:(CHIPLevelControlClusterMoveParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)stepWithParams:(CHIPLevelControlClusterStepParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)stopWithParams:(CHIPLevelControlClusterStopParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)moveToLevelWithOnOffWithParams:(CHIPLevelControlClusterMoveToLevelWithOnOffParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)moveWithOnOffWithParams:(CHIPLevelControlClusterMoveWithOnOffParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stepWithOnOffWithParams:(CHIPLevelControlClusterStepWithOnOffParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stopWithOnOffWithParams:(CHIPLevelControlClusterStopWithOnOffParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stopWithOnOffWithCompletionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryCommonDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryANSIDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRemainingTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryIECDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryApprovedChemistryWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryQuantityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryChargeStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOptionsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryTimeToFullChargeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOptionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryFunctionalWhileChargingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOnOffTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBatteryChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOnLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBatteryChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeBatteryChargingCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOnLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeActiveBatteryChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeActiveBatteryChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeActiveBatteryChargeFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOnTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOffTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDefaultMoveRateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeStartUpCurrentLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -9658,25 +10605,50 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Power Source Configuration + * Cluster Localization Configuration * */ -@interface CHIPPowerSourceConfiguration : CHIPCluster +@interface CHIPLocalizationConfiguration : CHIPCluster -- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSourcesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActiveLocaleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSupportedLocalesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -9734,15 +10706,32 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; @@ -9755,166 +10744,51 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Pressure Measurement + * Cluster Low Power * */ -@interface CHIPPressureMeasurement : CHIPCluster - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +@interface CHIPLowPower : CHIPCluster -- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)sleepWithParams:(CHIPLowPowerClusterSleepParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; +- (void)sleepWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeScaledToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeScaleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -9934,6 +10808,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -9955,447 +10846,326 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Pump Configuration and Control + * Cluster Media Input * */ -@interface CHIPPumpConfigurationAndControl : CHIPCluster +@interface CHIPMediaInput : CHIPCluster -- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)selectInputWithParams:(CHIPMediaInputClusterSelectInputParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)showInputStatusWithParams:(CHIPMediaInputClusterShowInputStatusParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)showInputStatusWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)hideInputStatusWithParams:(CHIPMediaInputClusterHideInputStatusParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)hideInputStatusWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)renameInputWithParams:(CHIPMediaInputClusterRenameInputParams *)params + completionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeInputListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInputListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentInputWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinConstPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxConstPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinCompPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxCompPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinConstSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +@end -- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; /** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. + * Cluster Media Playback + * */ -- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxConstSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +@interface CHIPMediaPlayback : CHIPCluster -- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinConstFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)playWithParams:(CHIPMediaPlaybackClusterPlayParams * _Nullable)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)playWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)pauseWithParams:(CHIPMediaPlaybackClusterPauseParams * _Nullable)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)pauseWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)stopPlaybackWithParams:(CHIPMediaPlaybackClusterStopPlaybackParams * _Nullable)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)stopPlaybackWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)startOverWithParams:(CHIPMediaPlaybackClusterStartOverParams * _Nullable)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)startOverWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)previousWithParams:(CHIPMediaPlaybackClusterPreviousParams * _Nullable)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)previousWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)nextWithParams:(CHIPMediaPlaybackClusterNextParams * _Nullable)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)nextWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)rewindWithParams:(CHIPMediaPlaybackClusterRewindParams * _Nullable)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)rewindWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)fastForwardWithParams:(CHIPMediaPlaybackClusterFastForwardParams * _Nullable)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)fastForwardWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)skipForwardWithParams:(CHIPMediaPlaybackClusterSkipForwardParams *)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)skipBackwardWithParams:(CHIPMediaPlaybackClusterSkipBackwardParams *)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)seekWithParams:(CHIPMediaPlaybackClusterSeekParams *)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( +- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxConstFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeCurrentStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeStartTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinConstTempWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxConstTempWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePumpStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeEffectiveOperationModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEffectiveControlModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeStartTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCapacityWithCompletionHandler:(void (^)( +- (void)readAttributeDurationWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeDurationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeSampledPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOperationModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePlaybackSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeControlModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeControlModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSeekRangeEndWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAlarmMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAlarmMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSeekRangeStartWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -10491,80 +11261,123 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Relative Humidity Measurement + * Cluster Mode Select * */ -@interface CHIPRelativeHumidityMeasurement : CHIPCluster +@interface CHIPModeSelect : CHIPCluster -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)changeToModeWithParams:(CHIPModeSelectClusterChangeToModeParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeStandardNamespaceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSupportedModesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeStartUpModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOnModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -10622,6 +11435,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -10643,117 +11473,176 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Scenes + * Cluster Network Commissioning * */ -@interface CHIPScenes : CHIPCluster +@interface CHIPNetworkCommissioning : CHIPCluster -- (void)addSceneWithParams:(CHIPScenesClusterAddSceneParams *)params - completionHandler: - (void (^)(CHIPScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)getSceneMembershipWithParams:(CHIPScenesClusterGetSceneMembershipParams *)params - completionHandler:(void (^)(CHIPScenesClusterGetSceneMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)recallSceneWithParams:(CHIPScenesClusterRecallSceneParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)removeAllScenesWithParams:(CHIPScenesClusterRemoveAllScenesParams *)params - completionHandler:(void (^)(CHIPScenesClusterRemoveAllScenesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)removeSceneWithParams:(CHIPScenesClusterRemoveSceneParams *)params - completionHandler: - (void (^)(CHIPScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)storeSceneWithParams:(CHIPScenesClusterStoreSceneParams *)params - completionHandler: - (void (^)(CHIPScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; -- (void)viewSceneWithParams:(CHIPScenesClusterViewSceneParams *)params - completionHandler: - (void (^)(CHIPScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)scanNetworksWithParams:(CHIPNetworkCommissioningClusterScanNetworksParams * _Nullable)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)addOrUpdateWiFiNetworkWithParams:(CHIPNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)addOrUpdateThreadNetworkWithParams:(CHIPNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)removeNetworkWithParams:(CHIPNetworkCommissioningClusterRemoveNetworkParams *)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)connectNetworkWithParams:(CHIPNetworkCommissioningClusterConnectNetworkParams *)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)reorderNetworkWithParams:(CHIPNetworkCommissioningClusterReorderNetworkParams *)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; -- (void)readAttributeSceneCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSceneCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxNetworksWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNetworksWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentSceneWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNetworksWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentGroupWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeSceneValidWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSceneValidWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNameSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInterfaceEnabledWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLastNetworkingStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLastNetworkIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLastConnectErrorValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -10811,6 +11700,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -10832,87 +11738,19 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Software Diagnostics + * Cluster OTA Software Update Provider * */ -@interface CHIPSoftwareDiagnostics : CHIPCluster - -- (void)resetWatermarksWithParams:(CHIPSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)resetWatermarksWithCompletionHandler:(StatusCompletion)completionHandler; - -- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeThreadMetricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentHeapFreeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentHeapUsedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +@interface CHIPOtaSoftwareUpdateProvider : CHIPCluster -- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)queryImageWithParams:(CHIPOtaSoftwareUpdateProviderClusterQueryImageParams *)params + completionHandler:(void (^)(CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)applyUpdateRequestWithParams:(CHIPOtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)notifyUpdateAppliedWithParams:(CHIPOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -11008,64 +11846,91 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Switch + * Cluster OTA Software Update Requestor * */ -@interface CHIPSwitch : CHIPCluster +@interface CHIPOtaSoftwareUpdateRequestor : CHIPCluster -- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)announceOtaProviderWithParams:(CHIPOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeDefaultOtaProvidersWithParams:(CHIPReadParams * _Nullable)params + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfPositionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeUpdatePossibleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMultiPressMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeUpdateStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeUpdateStateProgressWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -11161,200 +12026,323 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Target Navigator + * Cluster Occupancy Sensing * */ -@interface CHIPTargetNavigator : CHIPCluster - -- (void)navigateTargetWithParams:(CHIPTargetNavigatorClusterNavigateTargetParams *)params - completionHandler:(void (^)(CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; - -- (void)readAttributeTargetListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTargetListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -/** - * This API does not support setting autoResubscribe to NO in the - * CHIPSubscribeParams. - */ -- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCurrentTargetWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +@interface CHIPOccupancySensing : CHIPCluster -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOccupancyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOccupancySensorTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end - -/** - * Cluster Temperature Measurement - * - */ -@interface CHIPTemperatureMeasurement : CHIPCluster +- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -11374,6 +12362,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -11395,2257 +12400,6054 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Cluster Test Cluster + * Cluster On/Off * */ -@interface CHIPTestCluster : CHIPCluster +@interface CHIPOnOff : CHIPCluster -- (void)simpleStructEchoRequestWithParams:(CHIPTestClusterClusterSimpleStructEchoRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterSimpleStructResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testWithParams:(CHIPTestClusterClusterTestParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; -- (void)testWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)testAddArgumentsWithParams:(CHIPTestClusterClusterTestAddArgumentsParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testEmitTestEventRequestWithParams:(CHIPTestClusterClusterTestEmitTestEventRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testEnumsRequestWithParams:(CHIPTestClusterClusterTestEnumsRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterTestEnumsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testListInt8UArgumentRequestWithParams:(CHIPTestClusterClusterTestListInt8UArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testListInt8UReverseRequestWithParams:(CHIPTestClusterClusterTestListInt8UReverseRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testListNestedStructListArgumentRequestWithParams: - (CHIPTestClusterClusterTestListNestedStructListArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testListStructArgumentRequestWithParams:(CHIPTestClusterClusterTestListStructArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testNestedStructArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testNestedStructListArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructListArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testNotHandledWithParams:(CHIPTestClusterClusterTestNotHandledParams * _Nullable)params +- (void)offWithParams:(CHIPOnOffClusterOffParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; +- (void)offWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)onWithParams:(CHIPOnOffClusterOnParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; +- (void)onWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)toggleWithParams:(CHIPOnOffClusterToggleParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; +- (void)toggleWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)offWithEffectWithParams:(CHIPOnOffClusterOffWithEffectParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)onWithRecallGlobalSceneWithParams:(CHIPOnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)onWithRecallGlobalSceneWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)onWithTimedOffWithParams:(CHIPOnOffClusterOnWithTimedOffParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)testNullableOptionalRequestWithParams:(CHIPTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params - completionHandler:(void (^)(CHIPTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testSimpleOptionalArgumentRequestWithParams: - (CHIPTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)testSpecificWithParams:(CHIPTestClusterClusterTestSpecificParams * _Nullable)params - completionHandler:(void (^)(CHIPTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testSpecificWithCompletionHandler:(void (^)(CHIPTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testStructArgumentRequestWithParams:(CHIPTestClusterClusterTestStructArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)testUnknownCommandWithParams:(CHIPTestClusterClusterTestUnknownCommandParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)testUnknownCommandWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)timedInvokeRequestWithParams:(CHIPTestClusterClusterTimedInvokeRequestParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)timedInvokeRequestWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)readAttributeBooleanWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOnOffWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBitmap8WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBitmap8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGlobalSceneControlWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBitmap16WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBitmap16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOnTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBitmap32WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBitmap32WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOffWaitTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeBitmap64WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeBitmap64WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeStartUpOnOffWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt24uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt32uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt40uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +@end + +/** + * Cluster On/off Switch Configuration + * + */ +@interface CHIPOnOffSwitchConfiguration : CHIPCluster + +- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt48uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSwitchTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt56uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSwitchActionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt64uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt24sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt32sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +@end + +/** + * Cluster Operational Credentials + * + */ +@interface CHIPOperationalCredentials : CHIPCluster + +- (void)attestationRequestWithParams:(CHIPOperationalCredentialsClusterAttestationRequestParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)certificateChainRequestWithParams:(CHIPOperationalCredentialsClusterCertificateChainRequestParams *)params + completionHandler: + (void (^)(CHIPOperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)CSRRequestWithParams:(CHIPOperationalCredentialsClusterCSRRequestParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)addNOCWithParams:(CHIPOperationalCredentialsClusterAddNOCParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)updateNOCWithParams:(CHIPOperationalCredentialsClusterUpdateNOCParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)updateFabricLabelWithParams:(CHIPOperationalCredentialsClusterUpdateFabricLabelParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)removeFabricWithParams:(CHIPOperationalCredentialsClusterRemoveFabricParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)addTrustedRootCertificateWithParams:(CHIPOperationalCredentialsClusterAddTrustedRootCertificateParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)removeTrustedRootCertificateWithParams:(CHIPOperationalCredentialsClusterRemoveTrustedRootCertificateParams *)params + completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeNOCsWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt40sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNOCsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeFabricsWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt48sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt56sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSupportedFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeInt64sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCommissionedFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnum8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnum16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFloatSingleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFloatSingleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeFloatDoubleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeFloatDoubleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeOctetStringWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListInt8uWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeListInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeListOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListStructOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +@end + +/** + * Cluster Power Source + * + */ +@interface CHIPPowerSource : CHIPCluster + +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeListStructOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLongOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLongOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOrderWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeCharStringWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeLongCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLongCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeEpochUsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEpochUsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeEpochSWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEpochSWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeWiredCurrentTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeVendorIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeVendorIdWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeWiredNominalVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeEnumAttrWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeEnumAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeStructAttrWithCompletionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeStructAttrWithValue:(CHIPTestClusterClusterSimpleStruct * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeStructAttrWithValue:(CHIPTestClusterClusterSimpleStruct * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeStructAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeWiredPresentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeActiveWiredFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeBatteryVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBatteryVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeBatteryPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBatteryPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryPercentRemainingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeBatteryTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeBatteryTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBatteryTimeRemainingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBatteryChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeBatteryChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryChargeLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeBatteryReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBatteryReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryReplacementNeededWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeBatteryReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeBatteryReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBatteryReplaceabilityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListLongOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeBatteryPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBatteryPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryPresentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeActiveBatteryFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeActiveBatteryFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeListLongOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeActiveBatteryFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeListFabricScopedWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBatteryReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeListFabricScopedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeBatteryReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryReplacementDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBatteryCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeTimedWriteBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeBatteryCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryCommonDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneralErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBatteryANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneralErrorBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeBatteryANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryANSIDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBatteryIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterErrorBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeBatteryIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryIECDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBatteryApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeUnsupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeBatteryApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryApprovedChemistryWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeBatteryCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeBatteryCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBatteryCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeBatteryQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeBatteryQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableBitmap8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBatteryQuantityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBatteryChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableBitmap16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeBatteryChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryChargeStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableBitmap32WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBatteryTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableBitmap32WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeBatteryTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryTimeToFullChargeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableBitmap64WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeBatteryFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableBitmap64WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeBatteryFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryFunctionalWhileChargingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeBatteryChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBatteryChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeBatteryChargingCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeActiveBatteryChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeActiveBatteryChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeActiveBatteryChargeFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster Power Source Configuration + * + */ +@interface CHIPPowerSourceConfiguration : CHIPCluster + +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSourcesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster Pressure Measurement + * + */ +@interface CHIPPressureMeasurement : CHIPCluster + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeScaledToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeScaleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster Pump Configuration and Control + * + */ +@interface CHIPPumpConfigurationAndControl : CHIPCluster + +- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinConstPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxConstPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinCompPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxCompPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinConstSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxConstSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinConstFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxConstFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinConstTempWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxConstTempWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePumpStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeEffectiveOperationModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeEffectiveControlModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOperationModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeControlModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeControlModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAlarmMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAlarmMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster Relative Humidity Measurement + * + */ +@interface CHIPRelativeHumidityMeasurement : CHIPCluster + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster Scenes + * + */ +@interface CHIPScenes : CHIPCluster + +- (void)addSceneWithParams:(CHIPScenesClusterAddSceneParams *)params + completionHandler: + (void (^)(CHIPScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)viewSceneWithParams:(CHIPScenesClusterViewSceneParams *)params + completionHandler: + (void (^)(CHIPScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)removeSceneWithParams:(CHIPScenesClusterRemoveSceneParams *)params + completionHandler: + (void (^)(CHIPScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)removeAllScenesWithParams:(CHIPScenesClusterRemoveAllScenesParams *)params + completionHandler:(void (^)(CHIPScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)storeSceneWithParams:(CHIPScenesClusterStoreSceneParams *)params + completionHandler: + (void (^)(CHIPScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)recallSceneWithParams:(CHIPScenesClusterRecallSceneParams *)params completionHandler:(StatusCompletion)completionHandler; +- (void)getSceneMembershipWithParams:(CHIPScenesClusterGetSceneMembershipParams *)params + completionHandler:(void (^)(CHIPScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)enhancedAddSceneWithParams:(CHIPScenesClusterEnhancedAddSceneParams *)params + completionHandler:(void (^)(CHIPScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)enhancedViewSceneWithParams:(CHIPScenesClusterEnhancedViewSceneParams *)params + completionHandler:(void (^)(CHIPScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)copySceneWithParams:(CHIPScenesClusterCopySceneParams *)params + completionHandler: + (void (^)(CHIPScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; + +- (void)readAttributeSceneCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSceneCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentSceneWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentGroupWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeSceneValidWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSceneValidWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNameSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLastConfiguredByWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLastConfiguredByWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster Software Diagnostics + * + */ +@interface CHIPSoftwareDiagnostics : CHIPCluster + +- (void)resetWatermarksWithParams:(CHIPSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)resetWatermarksWithCompletionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeThreadMetricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentHeapFreeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentHeapUsedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster Switch + * + */ +@interface CHIPSwitch : CHIPCluster + +- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNumberOfPositionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMultiPressMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster Target Navigator + * + */ +@interface CHIPTargetNavigator : CHIPCluster + +- (void)navigateTargetWithParams:(CHIPTargetNavigatorClusterNavigateTargetParams *)params + completionHandler:(void (^)(CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeTargetListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeTargetListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCurrentTargetWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster Temperature Measurement + * + */ +@interface CHIPTemperatureMeasurement : CHIPCluster + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +@end + +/** + * Cluster Test Cluster + * + */ +@interface CHIPTestCluster : CHIPCluster + +- (void)testWithParams:(CHIPTestClusterClusterTestParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; +- (void)testWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)testNotHandledWithParams:(CHIPTestClusterClusterTestNotHandledParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)testSpecificWithParams:(CHIPTestClusterClusterTestSpecificParams * _Nullable)params + completionHandler:(void (^)(CHIPTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testSpecificWithCompletionHandler:(void (^)(CHIPTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testUnknownCommandWithParams:(CHIPTestClusterClusterTestUnknownCommandParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)testUnknownCommandWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)testAddArgumentsWithParams:(CHIPTestClusterClusterTestAddArgumentsParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testSimpleArgumentRequestWithParams:(CHIPTestClusterClusterTestSimpleArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testStructArrayArgumentRequestWithParams:(CHIPTestClusterClusterTestStructArrayArgumentRequestParams *)params + completionHandler: + (void (^)(CHIPTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testStructArgumentRequestWithParams:(CHIPTestClusterClusterTestStructArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testNestedStructArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testListStructArgumentRequestWithParams:(CHIPTestClusterClusterTestListStructArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testListInt8UArgumentRequestWithParams:(CHIPTestClusterClusterTestListInt8UArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testNestedStructListArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testListNestedStructListArgumentRequestWithParams: + (CHIPTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testListInt8UReverseRequestWithParams:(CHIPTestClusterClusterTestListInt8UReverseRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testEnumsRequestWithParams:(CHIPTestClusterClusterTestEnumsRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testNullableOptionalRequestWithParams:(CHIPTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params + completionHandler:(void (^)(CHIPTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testComplexNullableOptionalRequestWithParams:(CHIPTestClusterClusterTestComplexNullableOptionalRequestParams *)params + completionHandler: + (void (^)(CHIPTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)simpleStructEchoRequestWithParams:(CHIPTestClusterClusterSimpleStructEchoRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)timedInvokeRequestWithParams:(CHIPTestClusterClusterTimedInvokeRequestParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)timedInvokeRequestWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)testSimpleOptionalArgumentRequestWithParams: + (CHIPTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)testEmitTestEventRequestWithParams:(CHIPTestClusterClusterTestEmitTestEventRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)testEmitTestFabricScopedEventRequestWithParams:(CHIPTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + completionHandler: + (void (^)( + CHIPTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeBooleanWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeBitmap8WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBitmap8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeBitmap16WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBitmap16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeBitmap32WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBitmap32WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeBitmap64WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeBitmap64WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt24uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt32uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt40uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt48uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt56uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt64uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt24sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt32sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt40sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt48sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt56sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeInt64sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeEnum8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeEnum16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFloatSingleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFloatSingleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFloatDoubleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFloatDoubleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeOctetStringWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeListInt8uWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeListInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeListOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeListOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeListStructOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeListStructOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLongOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLongOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeCharStringWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeLongCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLongCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeEpochUsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeEpochUsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeEpochSWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeEpochSWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeVendorIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeVendorIdWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeEnumAttrWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeEnumAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeStructAttrWithCompletionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeStructAttrWithValue:(CHIPTestClusterClusterSimpleStruct * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStructAttrWithValue:(CHIPTestClusterClusterSimpleStruct * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeStructAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeListLongOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeListLongOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeListFabricScopedWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeListFabricScopedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeTimedWriteBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneralErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneralErrorBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeClusterErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterErrorBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeUnsupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableBitmap8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableBitmap16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableBitmap32WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableBitmap32WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableBitmap64WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableBitmap64WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt24uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt32uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt40uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt48uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt56uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt64uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt24sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt32sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt40sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt48sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt56sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableInt64sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeNullableEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeNullableEnum8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeNullableEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeNullableEnum16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableFloatSingleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt24uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableFloatSingleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableFloatDoubleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt32uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableFloatDoubleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeNullableOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableEnumAttrWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableEnumAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableStructWithCompletionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeNullableStructWithValue:(CHIPTestClusterClusterSimpleStruct * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableStructWithValue:(CHIPTestClusterClusterSimpleStruct * _Nullable)value params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt40uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + reportHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableStructWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + completionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt48uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt56uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt64uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt24sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +@end + +/** + * Cluster Thermostat + * + */ +@interface CHIPThermostat : CHIPCluster + +- (void)setpointRaiseLowerWithParams:(CHIPThermostatClusterSetpointRaiseLowerParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)setWeeklyScheduleWithParams:(CHIPThermostatClusterSetWeeklyScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler; +- (void)getWeeklyScheduleWithParams:(CHIPThermostatClusterGetWeeklyScheduleParams *)params + completionHandler:(void (^)(CHIPThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)clearWeeklyScheduleWithParams:(CHIPThermostatClusterClearWeeklyScheduleParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)clearWeeklyScheduleWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)getRelayStatusLogWithParams:(CHIPThermostatClusterGetRelayStatusLogParams * _Nullable)params + completionHandler:(void (^)(CHIPThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; +- (void)getRelayStatusLogWithCompletionHandler:(void (^)(CHIPThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt32sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeLocalTemperatureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt40sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOutdoorTemperatureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt48sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeOccupancyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt56sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableInt64sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableEnum8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableEnum16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableFloatSingleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributePiCoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableFloatSingleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePiCoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePiCoolingDemandWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableFloatDoubleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributePiHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableFloatDoubleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributePiHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributePiHeatingDemandWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeHvacSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeHvacSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeHvacSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeHvacSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeHvacSystemTypeConfigurationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableEnumAttrWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableEnumAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableStructWithCompletionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableStructWithValue:(CHIPTestClusterClusterSimpleStruct * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableStructWithValue:(CHIPTestClusterClusterSimpleStruct * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableStructWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeRemoteSensingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -@end - -/** - * Cluster Thermostat - * - */ -@interface CHIPThermostat : CHIPCluster - -- (void)clearWeeklyScheduleWithParams:(CHIPThermostatClusterClearWeeklyScheduleParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)clearWeeklyScheduleWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)getRelayStatusLogWithParams:(CHIPThermostatClusterGetRelayStatusLogParams * _Nullable)params - completionHandler:(void (^)(CHIPThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)getRelayStatusLogWithCompletionHandler:(void (^)(CHIPThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)getWeeklyScheduleWithParams:(CHIPThermostatClusterGetWeeklyScheduleParams *)params - completionHandler:(void (^)(CHIPThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler; -- (void)setWeeklyScheduleWithParams:(CHIPThermostatClusterSetWeeklyScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler; -- (void)setpointRaiseLowerWithParams:(CHIPThermostatClusterSetpointRaiseLowerParams *)params - completionHandler:(StatusCompletion)completionHandler; +- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeLocalTemperatureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeSystemModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAlarmMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAlarmMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeThermostatRunningModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeStartOfWeekWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; + +- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeThermostatRunningStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSetpointChangeSourceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSetpointChangeAmountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; +- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - -- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; + +- (void)readAttributeAcTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeAcTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAcTypeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( +- (void)readAttributeAcCapacityWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeAcCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAcCapacityWithValue:(NSNumber * _Nonnull)value params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeSystemModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAcCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( +- (void)readAttributeAcRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAcRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAcRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcRefrigerantTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAcCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAcCompressorTypeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcCompressorTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcErrorCodeWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)writeAttributeAcErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAcErrorCodeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAcErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; -+ (void)readAttributeStartOfWeekWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAcErrorCodeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAcLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAcLouverPositionWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcLouverPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcCoilTemperatureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcCapacityFormatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +- (void)writeAttributeAcCapacityFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeAcCapacityFormatWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcCapacityFormatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcCapacityFormatWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; /** * This API does not support setting autoResubscribe to NO in the * CHIPSubscribeParams. */ -- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler; -+ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler; +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; @@ -13834,6 +18636,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -15194,6 +20013,41 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -15242,6 +20096,44 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -15361,6 +20253,41 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -15460,6 +20387,23 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler; ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -15820,23 +20764,23 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPWindowCovering : CHIPCluster +- (void)upOrOpenWithParams:(CHIPWindowCoveringClusterUpOrOpenParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)upOrOpenWithCompletionHandler:(StatusCompletion)completionHandler; - (void)downOrCloseWithParams:(CHIPWindowCoveringClusterDownOrCloseParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler; - (void)downOrCloseWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)goToLiftPercentageWithParams:(CHIPWindowCoveringClusterGoToLiftPercentageParams *)params - completionHandler:(StatusCompletion)completionHandler; +- (void)stopMotionWithParams:(CHIPWindowCoveringClusterStopMotionParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler; +- (void)stopMotionWithCompletionHandler:(StatusCompletion)completionHandler; - (void)goToLiftValueWithParams:(CHIPWindowCoveringClusterGoToLiftValueParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)goToTiltPercentageWithParams:(CHIPWindowCoveringClusterGoToTiltPercentageParams *)params +- (void)goToLiftPercentageWithParams:(CHIPWindowCoveringClusterGoToLiftPercentageParams *)params completionHandler:(StatusCompletion)completionHandler; - (void)goToTiltValueWithParams:(CHIPWindowCoveringClusterGoToTiltValueParams *)params completionHandler:(StatusCompletion)completionHandler; -- (void)stopMotionWithParams:(CHIPWindowCoveringClusterStopMotionParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)stopMotionWithCompletionHandler:(StatusCompletion)completionHandler; -- (void)upOrOpenWithParams:(CHIPWindowCoveringClusterUpOrOpenParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler; -- (void)upOrOpenWithCompletionHandler:(StatusCompletion)completionHandler; +- (void)goToTiltPercentageWithParams:(CHIPWindowCoveringClusterGoToTiltPercentageParams *)params + completionHandler:(StatusCompletion)completionHandler; - (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -15853,6 +20797,44 @@ NS_ASSUME_NONNULL_BEGIN queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** @@ -15891,6 +20873,44 @@ NS_ASSUME_NONNULL_BEGIN completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + +- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler; +/** + * This API does not support setting autoResubscribe to NO in the + * CHIPSubscribeParams. + */ +- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler; ++ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeConfigStatusWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; /** diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index f63cce817b7a00..a14becd2b99fd5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -733,6 +733,66 @@ new CHIPAccessControlAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -1084,6 +1144,66 @@ new CHIPAccountLoginAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -1155,12 +1275,12 @@ @implementation CHIPAdministratorCommissioning return &_cppCluster; } -- (void)openBasicCommissioningWindowWithParams:(CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)openCommissioningWindowWithParams:(CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams *)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; + AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); @@ -1170,6 +1290,10 @@ - (void)openBasicCommissioningWindowWithParams:(CHIPAdministratorCommissioningCl timedInvokeTimeoutMs.SetValue(10000); } request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; + request.PAKEVerifier = [self asByteSpan:params.pakeVerifier]; + request.discriminator = params.discriminator.unsignedShortValue; + request.iterations = params.iterations.unsignedIntValue; + request.salt = [self asByteSpan:params.salt]; new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -1184,12 +1308,12 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)openCommissioningWindowWithParams:(CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)openBasicCommissioningWindowWithParams:(CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); @@ -1199,10 +1323,6 @@ - (void)openCommissioningWindowWithParams:(CHIPAdministratorCommissioningCluster timedInvokeTimeoutMs.SetValue(10000); } request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - request.PAKEVerifier = [self asByteSpan:params.pakeVerifier]; - request.discriminator = params.discriminator.unsignedShortValue; - request.iterations = params.iterations.unsignedIntValue; - request.salt = [self asByteSpan:params.salt]; new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -1630,6 +1750,66 @@ new CHIPAdministratorCommissioningAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2389,6 +2569,66 @@ new CHIPApplicationBasicAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2460,30 +2700,6 @@ @implementation CHIPApplicationLauncher return &_cppCluster; } -- (void)hideAppWithParams:(CHIPApplicationLauncherClusterHideAppParams *)params - completionHandler:(void (^)(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ApplicationLauncher::Commands::HideApp::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; - request.application.applicationId = [self asCharSpan:params.application.applicationId]; - - new CHIPApplicationLauncherClusterLauncherResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - - (void)launchAppWithParams:(CHIPApplicationLauncherClusterLaunchAppParams *)params completionHandler:(void (^)(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler @@ -2536,6 +2752,30 @@ new CHIPApplicationLauncherClusterLauncherResponseCallbackBridge( }); } +- (void)hideAppWithParams:(CHIPApplicationLauncherClusterHideAppParams *)params + completionHandler:(void (^)(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ApplicationLauncher::Commands::HideApp::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.application.catalogVendorId = params.application.catalogVendorId.unsignedShortValue; + request.application.applicationId = [self asCharSpan:params.application.applicationId]; + + new CHIPApplicationLauncherClusterLauncherResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + - (void)readAttributeCatalogListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2900,6 +3140,66 @@ new CHIPApplicationLauncherAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -2971,19 +3271,18 @@ @implementation CHIPAudioOutput return &_cppCluster; } -- (void)renameOutputWithParams:(CHIPAudioOutputClusterRenameOutputParams *)params +- (void)selectOutputWithParams:(CHIPAudioOutputClusterSelectOutputParams *)params completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - AudioOutput::Commands::RenameOutput::Type request; + AudioOutput::Commands::SelectOutput::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -2998,18 +3297,19 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)selectOutputWithParams:(CHIPAudioOutputClusterSelectOutputParams *)params +- (void)renameOutputWithParams:(CHIPAudioOutputClusterRenameOutputParams *)params completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - AudioOutput::Commands::SelectOutput::Type request; + AudioOutput::Commands::RenameOutput::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } request.index = params.index.unsignedCharValue; + request.name = [self asCharSpan:params.name]; new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -3341,6 +3641,66 @@ new CHIPAudioOutputAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -3655,59 +4015,91 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + [self writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBarrierPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierOpenEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -3717,216 +4109,153 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPBarrierControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPBarrierControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPBarrierControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBarrierControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBarrierControlAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierCloseEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBarrierControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -3935,7 +4264,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -3947,16 +4276,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -3972,274 +4301,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPBasic - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeDataModelRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + [self writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - -+ (void)readAttributeVendorNameWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::VendorName::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + } -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPVendorIdAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeVendorIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::VendorID::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeProductNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::ProductName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Basic::Attributes::ProductName::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeProductNameWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::ProductName::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeProductIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::ProductID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); } -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -4248,7 +4362,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::ProductID::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -4260,15 +4374,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeProductIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::ProductID::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -4284,24 +4399,24 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -4317,9 +4432,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -4327,46 +4442,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNodeLabelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -4376,24 +4493,24 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeLocationWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::Location::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLocationWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -4409,9 +4526,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Basic::Attributes::Location::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -4419,46 +4536,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::Location::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLocationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBarrierClosePeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::Location::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -4468,59 +4587,59 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeHardwareVersionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeBarrierPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -4530,119 +4649,247 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBarrierControlGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeHardwareVersionStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBarrierControlGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBarrierControlAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSoftwareVersionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); + new CHIPBarrierControlAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBarrierControlAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBarrierControlAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBarrierControlAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); auto successFn = Callback::FromCancelable(success); @@ -4655,60 +4902,59 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSoftwareVersionStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -4718,59 +4964,97 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, +@end + +@implementation CHIPBasic + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)mfgSpecificPingWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self mfgSpecificPingWithParams:nil completionHandler:completionHandler]; +} +- (void)mfgSpecificPingWithParams:(CHIPBasicClusterMfgSpecificPingParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Basic::Commands::MfgSpecificPing::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeManufacturingDateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeDataModelRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; + using TypeInfo = Basic::Attributes::DataModelRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -4780,18 +5064,18 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributePartNumberWithCompletionHandler:(void (^)( +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; + using TypeInfo = Basic::Attributes::VendorName::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -4804,7 +5088,7 @@ new CHIPCharStringAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; + using TypeInfo = Basic::Attributes::VendorName::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -4816,7 +5100,7 @@ new CHIPCharStringAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributePartNumberWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeVendorNameWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler @@ -4824,7 +5108,7 @@ + (void)readAttributePartNumberWithAttributeCache:(CHIPAttributeCacheContainer * new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; + using TypeInfo = Basic::Attributes::VendorName::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -4840,57 +5124,57 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeProductURLWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; + using TypeInfo = Basic::Attributes::VendorID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -4900,22 +5184,22 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; + using TypeInfo = Basic::Attributes::ProductName::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -4924,7 +5208,7 @@ new CHIPCharStringAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; + using TypeInfo = Basic::Attributes::ProductName::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -4936,16 +5220,16 @@ new CHIPCharStringAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeProductLabelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductNameWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; + using TypeInfo = Basic::Attributes::ProductName::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -4961,58 +5245,57 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::ProductID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::ProductID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSerialNumberWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; + using TypeInfo = Basic::Attributes::ProductID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -5022,24 +5305,24 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -5055,9 +5338,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; + using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.boolValue; + cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -5065,49 +5348,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLocalConfigDisabledWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNodeLabelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; + using TypeInfo = Basic::Attributes::NodeLabel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -5117,57 +5397,89 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLocationWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::Reachable::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::Location::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + [self writeAttributeLocationWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::Location::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::Reachable::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::Location::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeReachableWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::Reachable::TypeInfo; + using TypeInfo = Basic::Attributes::Location::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -5177,57 +5489,59 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeUniqueIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHardwareVersionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; + using TypeInfo = Basic::Attributes::HardwareVersion::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -5237,253 +5551,247 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(CHIPBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBasicCapabilityMinimaStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(CHIPBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCapabilityMinimaWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(CHIPBasicClusterCapabilityMinimaStruct * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBasicCapabilityMinimaStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::HardwareVersionString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBasicGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSoftwareVersionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::SoftwareVersion::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBasicAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::SoftwareVersionString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBasicAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBasicAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeManufacturingDateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBasicAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + using TypeInfo = Basic::Attributes::ManufacturingDate::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -5493,59 +5801,57 @@ new CHIPBasicAttributeListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePartNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePartNumberWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Basic::Attributes::PartNumber::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -5555,99 +5861,57 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPBinaryInputBasic - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOutOfServiceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductURLWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + using TypeInfo = Basic::Attributes::ProductURL::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -5657,90 +5921,58 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributePresentValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributePresentValueWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePresentValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeProductLabelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + using TypeInfo = Basic::Attributes::ProductLabel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -5750,58 +5982,58 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeStatusFlagsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSerialNumberWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + using TypeInfo = Basic::Attributes::SerialNumber::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -5811,252 +6043,212 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + [self writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeLocalConfigDisabledWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::LocalConfigDisabled::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeReachableWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBinaryInputBasicAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::Reachable::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::Reachable::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeReachableWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBinaryInputBasicAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::Reachable::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUniqueIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Basic::Attributes::UniqueID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -6066,153 +6258,77 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPBinding - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeBindingWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(CHIPBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBindingBindingListAttributeCallbackBridge( + new CHIPBasicCapabilityMinimaStructAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); -} - -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeBindingWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[CHIPBindingClusterTargetStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (CHIPBindingClusterTargetStruct *) value[i_0]; - if (element_0.node != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].node.Emplace(); - definedValue_2 = element_0.node.unsignedLongLongValue; - } - if (element_0.group != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].group.Emplace(); - definedValue_2 = element_0.group.unsignedShortValue; - } - if (element_0.endpoint != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].endpoint.Emplace(); - definedValue_2 = element_0.endpoint.unsignedShortValue; - } - if (element_0.cluster != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].cluster.Emplace(); - definedValue_2 = element_0.cluster.unsignedIntValue; - } - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(CHIPBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPBindingBindingListAttributeCallbackSubscriptionBridge( + new CHIPBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBasicCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBindingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCapabilityMinimaWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(CHIPBasicClusterCapabilityMinimaStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBindingBindingListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBasicCapabilityMinimaStructAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::CapabilityMinima::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBindingGeneratedCommandListListAttributeCallbackBridge( + new CHIPBasicGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -6226,19 +6342,19 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -6251,17 +6367,17 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBindingGeneratedCommandListListAttributeCallbackBridge( + new CHIPBasicGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Basic::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -6274,10 +6390,10 @@ new CHIPBindingGeneratedCommandListListAttributeCallbackBridge( - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBindingAcceptedCommandListListAttributeCallbackBridge( + new CHIPBasicAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -6291,19 +6407,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -6316,17 +6432,17 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBindingAcceptedCommandListListAttributeCallbackBridge( + new CHIPBasicAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Basic::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -6339,10 +6455,10 @@ new CHIPBindingAcceptedCommandListListAttributeCallbackBridge( - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBindingAttributeListListAttributeCallbackBridge( + new CHIPBasicAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -6354,19 +6470,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBindingAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -6379,31 +6495,90 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBindingAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPBasicAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Basic::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -6424,7 +6599,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -6445,7 +6620,7 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContai new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Basic::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -6463,64 +6638,96 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s @end -@implementation CHIPBooleanState +@implementation CHIPBinaryInputBasic - (chip::Controller::ClusterBase *)getCluster { return &_cppCluster; } -- (void)readAttributeStateValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveTextWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeActiveTextWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeStateValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeActiveTextWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -6530,252 +6737,336 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanStateGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeDescriptionWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanStateGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanStateAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeInactiveTextWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInactiveTextWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanStateAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanStateAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOutOfServiceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanStateAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePolarityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePolarityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -6785,556 +7076,306 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPBridgedActions - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributePresentValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)disableActionWithParams:(CHIPBridgedActionsClusterDisableActionParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::DisableAction::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self writeAttributePresentValueWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - -- (void)disableActionWithDurationWithParams:(CHIPBridgedActionsClusterDisableActionWithDurationParams *)params +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::DisableActionWithDuration::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)enableActionWithParams:(CHIPBridgedActionsClusterEnableActionParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::EnableAction::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)enableActionWithDurationWithParams:(CHIPBridgedActionsClusterEnableActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::EnableActionWithDuration::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)instantActionWithParams:(CHIPBridgedActionsClusterInstantActionParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::InstantAction::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)instantActionWithTransitionWithParams:(CHIPBridgedActionsClusterInstantActionWithTransitionParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::InstantActionWithTransition::Type request; + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.transitionTime = params.transitionTime.unsignedShortValue; - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)pauseActionWithParams:(CHIPBridgedActionsClusterPauseActionParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::PauseAction::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)pauseActionWithDurationWithParams:(CHIPBridgedActionsClusterPauseActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::PauseActionWithDuration::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + subscriptionEstablishedHandler); } -- (void)resumeActionWithParams:(CHIPBridgedActionsClusterResumeActionParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributePresentValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::ResumeAction::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)startActionWithParams:(CHIPBridgedActionsClusterStartActionParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeReliabilityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::StartAction::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)startActionWithDurationWithParams:(CHIPBridgedActionsClusterStartActionWithDurationParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::StartActionWithDuration::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - request.duration = params.duration.unsignedIntValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self writeAttributeReliabilityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - -- (void)stopActionWithParams:(CHIPBridgedActionsClusterStopActionParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - BridgedActions::Commands::StopAction::Type request; + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - request.actionID = params.actionID.unsignedShortValue; - if (params.invokeID != nil) { - auto & definedValue_0 = request.invokeID.Emplace(); - definedValue_0 = params.invokeID.unsignedIntValue; - } - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeActionListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBridgedActionsActionListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBridgedActionsActionListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBridgedActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeActionListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeReliabilityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBridgedActionsActionListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeEndpointListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBridgedActionsEndpointListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeEndpointListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBridgedActionsEndpointListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBridgedActionsEndpointListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEndpointListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStatusFlagsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBridgedActionsEndpointListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSetupUrlWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSetupUrlWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSetupUrlWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeApplicationTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -7347,10 +7388,10 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBridgedActionsGeneratedCommandListListAttributeCallbackBridge( + new CHIPBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -7364,19 +7405,19 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBridgedActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBridgedActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -7389,17 +7430,17 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBridgedActionsGeneratedCommandListListAttributeCallbackBridge( + new CHIPBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -7412,10 +7453,10 @@ new CHIPBridgedActionsGeneratedCommandListListAttributeCallbackBridge( - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBridgedActionsAcceptedCommandListListAttributeCallbackBridge( + new CHIPBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -7429,19 +7470,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBridgedActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBridgedActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -7454,17 +7495,17 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBridgedActionsAcceptedCommandListListAttributeCallbackBridge( + new CHIPBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -7477,10 +7518,10 @@ new CHIPBridgedActionsAcceptedCommandListListAttributeCallbackBridge( - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBridgedActionsAttributeListListAttributeCallbackBridge( + new CHIPBinaryInputBasicAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -7492,19 +7533,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBridgedActionsAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBridgedActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -7517,17 +7558,17 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBridgedActionsAttributeListListAttributeCallbackBridge( + new CHIPBinaryInputBasicAttributeListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -7537,128 +7578,57 @@ new CHIPBridgedActionsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -@end - -@implementation CHIPBridgedDeviceBasic - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeVendorNameWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -7668,57 +7638,59 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPVendorIdAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeVendorIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; + using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -7728,85 +7700,35 @@ new CHIPVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeProductNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPCharStringAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} +@implementation CHIPBinding -+ (void)readAttributeProductNameWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (chip::Controller::ClusterBase *)getCluster { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return &_cppCluster; } -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBindingWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBindingBindingListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + }); } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeBindingWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -7822,9 +7744,46 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + using TypeInfo = Binding::Attributes::Binding::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPBindingClusterTargetStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (CHIPBindingClusterTargetStruct *) value[i_0]; + if (element_0.node != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].node.Emplace(); + definedValue_2 = element_0.node.unsignedLongLongValue; + } + if (element_0.group != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].group.Emplace(); + definedValue_2 = element_0.group.unsignedShortValue; + } + if (element_0.endpoint != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].endpoint.Emplace(); + definedValue_2 = element_0.endpoint.unsignedShortValue; + } + if (element_0.cluster != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].cluster.Emplace(); + definedValue_2 = element_0.cluster.unsignedIntValue; + } + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -7832,46 +7791,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPBindingBindingListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNodeLabelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBindingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBindingBindingListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + using TypeInfo = Binding::Attributes::Binding::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -7881,247 +7840,250 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBindingGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeHardwareVersionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler + new CHIPBindingGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBindingAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeHardwareVersionStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBindingAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBindingAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPBindingAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSoftwareVersionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBindingAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSoftwareVersionStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; + using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -8131,59 +8093,59 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeManufacturingDateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; + using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -8193,57 +8155,66 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributePartNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation CHIPBooleanState + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); + return &_cppCluster; +} + +- (void)readAttributeStateValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePartNumberWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeStateValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -8253,299 +8224,250 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBooleanStateGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeProductURLWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBooleanStateGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBooleanStateAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeProductLabelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBooleanStateAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBooleanStateAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPBooleanStateAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSerialNumberWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeReachableWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBooleanStateAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeUniqueIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -8555,204 +8477,11 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBridgedDeviceBasicAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBridgedDeviceBasicAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -8773,7 +8502,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -8794,7 +8523,7 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContai new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -8812,49 +8541,60 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s @end -@implementation CHIPChannel +@implementation CHIPBridgedActions - (chip::Controller::ClusterBase *)getCluster { return &_cppCluster; } -- (void)changeChannelWithParams:(CHIPChannelClusterChangeChannelParams *)params - completionHandler:(void (^)(CHIPChannelClusterChangeChannelResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)instantActionWithParams:(CHIPBridgedActionsClusterInstantActionParams *)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - Channel::Commands::ChangeChannel::Type request; + BridgedActions::Commands::InstantAction::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.match = [self asCharSpan:params.match]; + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } - new CHIPChannelClusterChangeChannelResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.InvokeCommand( request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)changeChannelByNumberWithParams:(CHIPChannelClusterChangeChannelByNumberParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)instantActionWithTransitionWithParams:(CHIPBridgedActionsClusterInstantActionWithTransitionParams *)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - Channel::Commands::ChangeChannelByNumber::Type request; + BridgedActions::Commands::InstantActionWithTransition::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.majorNumber = params.majorNumber.unsignedShortValue; - request.minorNumber = params.minorNumber.unsignedShortValue; + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } + request.transitionTime = params.transitionTime.unsignedShortValue; new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -8869,17 +8609,22 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)skipChannelWithParams:(CHIPChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)startActionWithParams:(CHIPBridgedActionsClusterStartActionParams *)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - Channel::Commands::SkipChannel::Type request; + BridgedActions::Commands::StartAction::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.count = params.count.unsignedShortValue; + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -8894,185 +8639,396 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)readAttributeChannelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)startActionWithDurationWithParams:(CHIPBridgedActionsClusterStartActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPChannelChannelListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BridgedActions::Commands::StartActionWithDuration::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } + request.duration = params.duration.unsignedIntValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)stopActionWithParams:(CHIPBridgedActionsClusterStopActionParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPChannelChannelListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BridgedActions::Commands::StopAction::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeChannelListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)pauseActionWithParams:(CHIPBridgedActionsClusterPauseActionParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPChannelChannelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BridgedActions::Commands::PauseAction::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} + } + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } -- (void)readAttributeLineupWithCompletionHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPChannelLineupStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)pauseActionWithDurationWithParams:(CHIPBridgedActionsClusterPauseActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPChannelLineupStructAttributeCallbackSubscriptionBridge( + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BridgedActions::Commands::PauseActionWithDuration::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } + request.duration = params.duration.unsignedIntValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)resumeActionWithParams:(CHIPBridgedActionsClusterResumeActionParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BridgedActions::Commands::ResumeAction::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)enableActionWithParams:(CHIPBridgedActionsClusterEnableActionParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BridgedActions::Commands::EnableAction::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)enableActionWithDurationWithParams:(CHIPBridgedActionsClusterEnableActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BridgedActions::Commands::EnableActionWithDuration::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } + request.duration = params.duration.unsignedIntValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)disableActionWithParams:(CHIPBridgedActionsClusterDisableActionParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BridgedActions::Commands::DisableAction::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)disableActionWithDurationWithParams:(CHIPBridgedActionsClusterDisableActionWithDurationParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + BridgedActions::Commands::DisableActionWithDuration::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.actionID = params.actionID.unsignedShortValue; + if (params.invokeID != nil) { + auto & definedValue_0 = request.invokeID.Emplace(); + definedValue_0 = params.invokeID.unsignedIntValue; + } + request.duration = params.duration.unsignedIntValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeActionListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBridgedActionsActionListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBridgedActionsActionListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBridgedActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLineupWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeActionListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPChannelLineupStructAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBridgedActionsActionListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedActions::Attributes::ActionList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEndpointListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPChannelCurrentChannelStructAttributeCallbackBridge( + new CHIPBridgedActionsEndpointListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEndpointListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( + new CHIPBridgedActionsEndpointListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBridgedActionsEndpointListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentChannelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeEndpointListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPChannelCurrentChannelStructAttributeCallbackBridge( + new CHIPBridgedActionsEndpointListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + using TypeInfo = BridgedActions::Attributes::EndpointList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -9082,13 +9038,73 @@ new CHIPChannelCurrentChannelStructAttributeCallbackBridge( }); } +- (void)readAttributeSetupUrlWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSetupUrlWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSetupUrlWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedActions::Attributes::SetupUrl::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPChannelGeneratedCommandListListAttributeCallbackBridge( + new CHIPBridgedActionsGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -9102,19 +9118,19 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPBridgedActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBridgedActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -9127,17 +9143,17 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPChannelGeneratedCommandListListAttributeCallbackBridge( + new CHIPBridgedActionsGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BridgedActions::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -9150,10 +9166,10 @@ new CHIPChannelGeneratedCommandListListAttributeCallbackBridge( - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPChannelAcceptedCommandListListAttributeCallbackBridge( + new CHIPBridgedActionsAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -9167,19 +9183,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPBridgedActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBridgedActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -9192,17 +9208,17 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPChannelAcceptedCommandListListAttributeCallbackBridge( + new CHIPBridgedActionsAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BridgedActions::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -9215,10 +9231,10 @@ new CHIPChannelAcceptedCommandListListAttributeCallbackBridge( - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPChannelAttributeListListAttributeCallbackBridge( + new CHIPBridgedActionsAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -9230,19 +9246,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPChannelAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPBridgedActionsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBridgedActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -9255,17 +9271,17 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPChannelAttributeListListAttributeCallbackBridge( + new CHIPBridgedActionsAttributeListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + using TypeInfo = BridgedActions::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -9275,11 +9291,71 @@ new CHIPChannelAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedActions::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedActions::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedActions::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -9300,7 +9376,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -9321,7 +9397,7 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContai new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedActions::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -9339,625 +9415,402 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s @end -@implementation CHIPColorControl +@implementation CHIPBridgedDeviceBasic - (chip::Controller::ClusterBase *)getCluster { return &_cppCluster; } -- (void)colorLoopSetWithParams:(CHIPColorControlClusterColorLoopSetParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::ColorLoopSet::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.updateFlags = static_cast>(params.updateFlags.unsignedCharValue); - request.action = static_cast>(params.action.unsignedCharValue); - request.direction = static_cast>(params.direction.unsignedCharValue); - request.time = params.time.unsignedShortValue; - request.startHue = params.startHue.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)enhancedMoveHueWithParams:(CHIPColorControlClusterEnhancedMoveHueParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeVendorNameWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::VendorName::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)enhancedMoveToHueWithParams:(CHIPColorControlClusterEnhancedMoveToHueParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.direction = static_cast>(params.direction.unsignedCharValue); - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; + new CHIPVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPVendorIdAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)enhancedMoveToHueAndSaturationWithParams:(CHIPColorControlClusterEnhancedMoveToHueAndSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeVendorIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::VendorID::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.enhancedHue = params.enhancedHue.unsignedShortValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)enhancedStepHueWithParams:(CHIPColorControlClusterEnhancedStepHueParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeProductNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::EnhancedStepHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.stepMode = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)moveColorWithParams:(CHIPColorControlClusterMoveColorParams *)params completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeProductNameWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveColor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductName::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.rateX = params.rateX.shortValue; - request.rateY = params.rateY.shortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)moveColorTemperatureWithParams:(CHIPColorControlClusterMoveColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveColorTemperature::Type request; + [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedShortValue; - request.colorTemperatureMinimum = params.colorTemperatureMinimum.unsignedShortValue; - request.colorTemperatureMaximum = params.colorTemperatureMaximum.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)moveHueWithParams:(CHIPColorControlClusterMoveHueParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)moveSaturationWithParams:(CHIPColorControlClusterMoveSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeNodeLabelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::NodeLabel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)moveToColorWithParams:(CHIPColorControlClusterMoveToColorParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveToColor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.colorX = params.colorX.unsignedShortValue; - request.colorY = params.colorY.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)moveToColorTemperatureWithParams:(CHIPColorControlClusterMoveToColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeHardwareVersionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveToColorTemperature::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersion::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.colorTemperature = params.colorTemperature.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)moveToHueWithParams:(CHIPColorControlClusterMoveToHueParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveToHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.hue = params.hue.unsignedCharValue; - request.direction = static_cast>(params.direction.unsignedCharValue); - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)moveToHueAndSaturationWithParams:(CHIPColorControlClusterMoveToHueAndSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveToHueAndSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.hue = params.hue.unsignedCharValue; - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)moveToSaturationWithParams:(CHIPColorControlClusterMoveToSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::MoveToSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.saturation = params.saturation.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stepColorWithParams:(CHIPColorControlClusterStepColorParams *)params completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::StepColor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.stepX = params.stepX.shortValue; - request.stepY = params.stepY.shortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stepColorTemperatureWithParams:(CHIPColorControlClusterStepColorTemperatureParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::StepColorTemperature::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.stepMode = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedShortValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.colorTemperatureMinimum = params.colorTemperatureMinimum.unsignedShortValue; - request.colorTemperatureMaximum = params.colorTemperatureMaximum.unsignedShortValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stepHueWithParams:(CHIPColorControlClusterStepHueParams *)params completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::StepHue::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.stepMode = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stepSaturationWithParams:(CHIPColorControlClusterStepSaturationParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::StepSaturation::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.stepMode = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedCharValue; - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stopMoveStepWithParams:(CHIPColorControlClusterStopMoveStepParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ColorControl::Commands::StopMoveStep::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.optionsMask = params.optionsMask.unsignedCharValue; - request.optionsOverride = params.optionsOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentHueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::HardwareVersionString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -9967,59 +9820,59 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentSaturationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSoftwareVersionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersion::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -10029,59 +9882,60 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRemainingTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::SoftwareVersionString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -10091,57 +9945,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeCurrentXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentXWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeManufacturingDateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::ManufacturingDate::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -10151,57 +10007,57 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeCurrentYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePartNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentYWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePartNumberWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::PartNumber::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -10211,59 +10067,57 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeProductURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeDriftCompensationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductURLWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductURL::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -10273,24 +10127,23 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { @@ -10298,7 +10151,7 @@ new CHIPCharStringAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -10310,16 +10163,16 @@ new CHIPCharStringAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeCompensationTextWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductLabelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::ProductLabel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -10335,59 +10188,58 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeColorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorTemperatureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSerialNumberWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::SerialNumber::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -10397,57 +10249,57 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorModeWithCompletionHandler:(void (^)( +- (void)readAttributeReachableWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeReachableWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::Reachable::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -10457,92 +10309,57 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorControlOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorControlOptions::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorControlOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorControlOptionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorControlOptionsWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorControlOptions::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeColorControlOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorControlOptions::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorControlOptionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUniqueIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorControlOptions::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::UniqueID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -10552,241 +10369,250 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBridgedDeviceBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfPrimariesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBridgedDeviceBasicGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePrimary1XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBridgedDeviceBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePrimary1XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBridgedDeviceBasicAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePrimary1YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBridgedDeviceBasicAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBridgedDeviceBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePrimary1YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPBridgedDeviceBasicAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasic::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePrimary1IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -10796,22 +10622,23 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary2XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -10820,7 +10647,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -10832,15 +10659,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributePrimary2XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; + using TypeInfo = BridgedDeviceBasic::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -10856,119 +10684,142 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributePrimary2YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation CHIPChannel + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + return &_cppCluster; } -- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)changeChannelWithParams:(CHIPChannelClusterChangeChannelParams *)params + completionHandler:(void (^)(CHIPChannelClusterChangeChannelResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Channel::Commands::ChangeChannel::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.match = [self asCharSpan:params.match]; + + new CHIPChannelClusterChangeChannelResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)changeChannelByNumberWithParams:(CHIPChannelClusterChangeChannelByNumberParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Channel::Commands::ChangeChannelByNumber::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.majorNumber = params.majorNumber.unsignedShortValue; + request.minorNumber = params.minorNumber.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); }, - subscriptionEstablishedHandler); + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributePrimary2YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)skipChannelWithParams:(CHIPChannelClusterSkipChannelParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Channel::Commands::SkipChannel::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); + } + request.count = params.count.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeChannelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPChannelChannelListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPChannelChannelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePrimary2IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChannelListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPChannelChannelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -10978,57 +10829,60 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary3XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLineupWithCompletionHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPChannelLineupStructAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPChannelLineupStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePrimary3XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLineupWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(CHIPChannelClusterLineupInfo * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPChannelLineupStructAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -11038,301 +10892,314 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributePrimary3YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPChannelCurrentChannelStructAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePrimary3YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentChannelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(CHIPChannelClusterChannelInfo * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPChannelCurrentChannelStructAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPChannelGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePrimary3IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPChannelGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePrimary4XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPChannelAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePrimary4XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPChannelAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePrimary4YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPChannelAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPChannelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePrimary4YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPChannelAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePrimary4IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -11342,22 +11209,23 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePrimary5XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -11366,7 +11234,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -11378,15 +11246,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributePrimary5XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -11402,580 +11271,627 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributePrimary5YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} +@implementation CHIPColorControl -+ (void)readAttributePrimary5YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (chip::Controller::ClusterBase *)getCluster { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return &_cppCluster; } -- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)moveToHueWithParams:(CHIPColorControlClusterMoveToHueParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveToHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.hue = params.hue.unsignedCharValue; + request.direction = static_cast>(params.direction.unsignedCharValue); + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributePrimary5IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)moveHueWithParams:(CHIPColorControlClusterMoveHueParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributePrimary6XWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributePrimary6XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)stepHueWithParams:(CHIPColorControlClusterStepHueParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::StepHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributePrimary6YWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + } + request.stepMode = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributePrimary6YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)moveToSaturationWithParams:(CHIPColorControlClusterMoveToSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveToSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + } + request.saturation = params.saturation.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributePrimary6IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)moveSaturationWithParams:(CHIPColorControlClusterMoveSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; -- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)stepSaturationWithParams:(CHIPColorControlClusterStepSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedWriteTimeoutMs; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::StepSaturation::Type request; if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.stepMode = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedCharValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; - new CHIPDefaultSuccessCallbackBridge( + new CHIPCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { + ^(id _Nullable value, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)moveToHueAndSaturationWithParams:(CHIPColorControlClusterMoveToHueAndSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveToHueAndSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.hue = params.hue.unsignedCharValue; + request.saturation = params.saturation.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); }, - subscriptionEstablishedHandler); + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeWhitePointXWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)moveToColorWithParams:(CHIPColorControlClusterMoveToColorParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveToColor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); + } + request.colorX = params.colorX.unsignedShortValue; + request.colorY = params.colorY.unsignedShortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)moveColorWithParams:(CHIPColorControlClusterMoveColorParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveColor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.rateX = params.rateX.shortValue; + request.rateY = params.rateY.shortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)stepColorWithParams:(CHIPColorControlClusterStepColorParams *)params completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::StepColor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.stepX = params.stepX.shortValue; + request.stepY = params.stepY.shortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)moveToColorTemperatureWithParams:(CHIPColorControlClusterMoveToColorTemperatureParams *)params + completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedWriteTimeoutMs; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveToColorTemperature::Type request; if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.colorTemperature = params.colorTemperature.unsignedShortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; - new CHIPDefaultSuccessCallbackBridge( + new CHIPCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { + ^(id _Nullable value, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)enhancedMoveToHueWithParams:(CHIPColorControlClusterEnhancedMoveToHueParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::EnhancedMoveToHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.enhancedHue = params.enhancedHue.unsignedShortValue; + request.direction = static_cast>(params.direction.unsignedCharValue); + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)enhancedMoveHueWithParams:(CHIPColorControlClusterEnhancedMoveHueParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::EnhancedMoveHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); }, - subscriptionEstablishedHandler); + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeWhitePointYWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)enhancedStepHueWithParams:(CHIPColorControlClusterEnhancedStepHueParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::EnhancedStepHue::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); + } + request.stepMode = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedShortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)enhancedMoveToHueAndSaturationWithParams:(CHIPColorControlClusterEnhancedMoveToHueAndSaturationParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.enhancedHue = params.enhancedHue.unsignedShortValue; + request.saturation = params.saturation.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)colorLoopSetWithParams:(CHIPColorControlClusterColorLoopSetParams *)params + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::ColorLoopSet::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.updateFlags = static_cast>(params.updateFlags.unsignedCharValue); + request.action = static_cast>(params.action.unsignedCharValue); + request.direction = static_cast>(params.direction.unsignedCharValue); + request.time = params.time.unsignedShortValue; + request.startHue = params.startHue.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)stopMoveStepWithParams:(CHIPColorControlClusterStopMoveStepParams *)params + completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedWriteTimeoutMs; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::StopMoveStep::Type request; if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; - new CHIPDefaultSuccessCallbackBridge( + new CHIPCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { + ^(id _Nullable value, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)moveColorTemperatureWithParams:(CHIPColorControlClusterMoveColorTemperatureParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::MoveColorTemperature::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedShortValue; + request.colorTemperatureMinimum = params.colorTemperatureMinimum.unsignedShortValue; + request.colorTemperatureMaximum = params.colorTemperatureMaximum.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)stepColorTemperatureWithParams:(CHIPColorControlClusterStepColorTemperatureParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ColorControl::Commands::StepColorTemperature::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.stepMode = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedShortValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.colorTemperatureMinimum = params.colorTemperatureMinimum.unsignedShortValue; + request.colorTemperatureMaximum = params.colorTemperatureMaximum.unsignedShortValue; + request.optionsMask = params.optionsMask.unsignedCharValue; + request.optionsOverride = params.optionsOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointRXWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentHueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -11985,90 +11901,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointRYWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentSaturationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -12078,92 +11963,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointRIntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRemainingTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -12173,54 +12025,22 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -12229,7 +12049,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -12241,16 +12061,15 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointGXWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentXWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -12266,54 +12085,22 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -12322,7 +12109,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -12334,16 +12121,15 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointGYWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentYWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -12359,56 +12145,23 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -12417,7 +12170,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -12429,16 +12182,16 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointGIntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDriftCompensationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -12454,90 +12207,59 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointBXWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCompensationTextWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -12547,54 +12269,23 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -12603,7 +12294,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -12615,16 +12306,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointBYWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorTemperatureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTemperature::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -12640,56 +12331,22 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -12698,7 +12355,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -12710,16 +12367,15 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeColorPointBIntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -12735,59 +12391,92 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorControlOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorControlOptions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorControlOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + [self writeAttributeColorControlOptionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeColorControlOptionsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorControlOptions::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeColorControlOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorControlOptions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorControlOptionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorControlOptions::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -12797,18 +12486,18 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -12822,7 +12511,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -12834,7 +12523,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeEnhancedColorModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeNumberOfPrimariesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: @@ -12843,7 +12532,7 @@ + (void)readAttributeEnhancedColorModeWithAttributeCache:(CHIPAttributeCacheCont new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -12859,59 +12548,57 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary1XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorLoopActiveWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary1XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -12921,59 +12608,57 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary1YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorLoopDirectionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary1YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -12983,59 +12668,59 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorLoopTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary1IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -13045,24 +12730,22 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary2XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -13071,7 +12754,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -13083,16 +12766,15 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary2XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -13108,24 +12790,22 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary2YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -13134,7 +12814,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -13146,16 +12826,15 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary2YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -13171,59 +12850,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeColorCapabilitiesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePrimary2IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -13233,24 +12912,22 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorTempPhysicalMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary3XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMin::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorTempPhysicalMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -13259,7 +12936,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMin::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -13271,16 +12948,15 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeColorTempPhysicalMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary3XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMin::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -13296,24 +12972,22 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeColorTempPhysicalMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary3YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMax::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeColorTempPhysicalMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -13322,7 +12996,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMax::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -13334,16 +13008,15 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeColorTempPhysicalMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary3YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMax::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -13359,60 +13032,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary3IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -13422,59 +13094,22 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary4XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -13483,7 +13118,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -13495,16 +13130,15 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary4XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -13520,216 +13154,204 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary4YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPColorControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary4YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPColorControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPColorControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary4IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPColorControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary5XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPColorControlAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPColorControlAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary5XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPColorControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary5YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -13738,7 +13360,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -13750,16 +13372,15 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary5YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -13775,366 +13396,119 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPContentLauncher - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)launchContentWithParams:(CHIPContentLauncherClusterLaunchContentParams *)params - completionHandler:(void (^)(CHIPContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ContentLauncher::Commands::LaunchContent::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.search.parameterList.count != 0) { - auto * listHolder_1 = new ListHolder(params.search.parameterList.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.search.parameterList.count; ++i_1) { - if (![params.search.parameterList[i_1] isKindOfClass:[CHIPContentLauncherClusterParameter class]]) { - // Wrong kind of value. - return; - } - auto element_1 = (CHIPContentLauncherClusterParameter *) params.search.parameterList[i_1]; - listHolder_1->mList[i_1].type = static_castmList[i_1].type)>>( - element_1.type.unsignedCharValue); - listHolder_1->mList[i_1].value = [self asCharSpan:element_1.value]; - if (element_1.externalIDList != nil) { - auto & definedValue_3 = listHolder_1->mList[i_1].externalIDList.Emplace(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (element_1.externalIDList.count != 0) { - auto * listHolder_4 = new ListHolder(element_1.externalIDList.count); - if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { - return; - } - listFreer.add(listHolder_4); - for (size_t i_4 = 0; i_4 < element_1.externalIDList.count; ++i_4) { - if (![element_1.externalIDList[i_4] - isKindOfClass:[CHIPContentLauncherClusterAdditionalInfo class]]) { - // Wrong kind of value. - return; - } - auto element_4 = (CHIPContentLauncherClusterAdditionalInfo *) element_1.externalIDList[i_4]; - listHolder_4->mList[i_4].name = [self asCharSpan:element_4.name]; - listHolder_4->mList[i_4].value = [self asCharSpan:element_4.value]; - } - definedValue_3 = ListType_4(listHolder_4->mList, element_1.externalIDList.count); - } else { - definedValue_3 = ListType_4(); - } - } - } - } - request.search.parameterList = ListType_1(listHolder_1->mList, params.search.parameterList.count); - } else { - request.search.parameterList = ListType_1(); - } - } - request.autoPlay = params.autoPlay.boolValue; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asCharSpan:params.data]; - } - - new CHIPContentLauncherClusterLaunchResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)launchURLWithParams:(CHIPContentLauncherClusterLaunchURLParams *)params - completionHandler:(void (^)(CHIPContentLauncherClusterLaunchResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ContentLauncher::Commands::LaunchURL::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.contentURL = [self asCharSpan:params.contentURL]; - if (params.displayString != nil) { - auto & definedValue_0 = request.displayString.Emplace(); - definedValue_0 = [self asCharSpan:params.displayString]; - } - if (params.brandingInformation != nil) { - auto & definedValue_0 = request.brandingInformation.Emplace(); - definedValue_0.providerName = [self asCharSpan:params.brandingInformation.providerName]; - if (params.brandingInformation.background != nil) { - auto & definedValue_2 = definedValue_0.background.Emplace(); - if (params.brandingInformation.background.imageUrl != nil) { - auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.background.imageUrl]; - } - if (params.brandingInformation.background.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.background.color]; - } - if (params.brandingInformation.background.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.background.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.background.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.background.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.logo != nil) { - auto & definedValue_2 = definedValue_0.logo.Emplace(); - if (params.brandingInformation.logo.imageUrl != nil) { - auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.logo.imageUrl]; - } - if (params.brandingInformation.logo.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.logo.color]; - } - if (params.brandingInformation.logo.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.logo.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.logo.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.logo.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.progressBar != nil) { - auto & definedValue_2 = definedValue_0.progressBar.Emplace(); - if (params.brandingInformation.progressBar.imageUrl != nil) { - auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.imageUrl]; - } - if (params.brandingInformation.progressBar.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.color]; - } - if (params.brandingInformation.progressBar.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.progressBar.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.progressBar.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.progressBar.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.splash != nil) { - auto & definedValue_2 = definedValue_0.splash.Emplace(); - if (params.brandingInformation.splash.imageUrl != nil) { - auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.splash.imageUrl]; - } - if (params.brandingInformation.splash.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.splash.color]; - } - if (params.brandingInformation.splash.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.splash.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.splash.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.splash.size.metric.unsignedCharValue); - } - } - if (params.brandingInformation.waterMark != nil) { - auto & definedValue_2 = definedValue_0.waterMark.Emplace(); - if (params.brandingInformation.waterMark.imageUrl != nil) { - auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.imageUrl]; - } - if (params.brandingInformation.waterMark.color != nil) { - auto & definedValue_4 = definedValue_2.color.Emplace(); - definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.color]; - } - if (params.brandingInformation.waterMark.size != nil) { - auto & definedValue_4 = definedValue_2.size.Emplace(); - definedValue_4.width = params.brandingInformation.waterMark.size.width.doubleValue; - definedValue_4.height = params.brandingInformation.waterMark.size.height.doubleValue; - definedValue_4.metric = static_cast>( - params.brandingInformation.waterMark.size.metric.unsignedCharValue); - } - } - } - - new CHIPContentLauncherClusterLaunchResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPContentLauncherAcceptHeaderListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptHeaderWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary5IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPContentLauncherAcceptHeaderListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary6XWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary6XWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -14144,216 +13518,269 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary6YWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPContentLauncherGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary6YWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPContentLauncherGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPContentLauncherAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePrimary6IntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPContentLauncherAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPContentLauncherAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWhitePointXWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPContentLauncherAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -14362,7 +13789,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -14374,16 +13801,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWhitePointYWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -14399,253 +13826,371 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPDescriptor - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)readAttributeDeviceListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPDescriptorDeviceListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDescriptorDeviceListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDescriptorDeviceListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeDeviceListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointRXWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDescriptorDeviceListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeServerListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDescriptorServerListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDescriptorServerListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeServerListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointRYWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDescriptorServerListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClientListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPDescriptorClientListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDescriptorClientListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClientListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointRIntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDescriptorClientListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePartsListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDescriptorPartsListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDescriptorPartsListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePartsListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointGXWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDescriptorPartsListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -14655,216 +14200,335 @@ new CHIPDescriptorPartsListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDescriptorGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointGYWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDescriptorGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPDescriptorAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPDescriptorAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; ++ (void)readAttributeColorPointGIntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDescriptorAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDescriptorAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointBXWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDescriptorAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -14873,7 +14537,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -14885,16 +14549,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorPointBYWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -14910,984 +14574,779 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPDiagnosticLogs - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)retrieveLogsRequestWithParams:(CHIPDiagnosticLogsClusterRetrieveLogsRequestParams *)params - completionHandler:(void (^)(CHIPDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; + [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - request.intent = static_cast>(params.intent.unsignedCharValue); - request.requestedProtocol - = static_cast>(params.requestedProtocol.unsignedCharValue); - request.transferFileDesignator = [self asByteSpan:params.transferFileDesignator]; - - new CHIPDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeColorPointBIntensityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPDiagnosticLogsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnhancedColorModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDiagnosticLogsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -@end - -@implementation CHIPDoorLock - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)clearCredentialWithParams:(CHIPDoorLockClusterClearCredentialParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::ClearCredential::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params.credential == nil) { - request.credential.SetNull(); - } else { - auto & nonNullValue_0 = request.credential.SetNonNull(); - nonNullValue_0.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)clearHolidayScheduleWithParams:(CHIPDoorLockClusterClearHolidayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeColorLoopActiveWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::ClearHolidaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)clearUserWithParams:(CHIPDoorLockClusterClearUserParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::ClearUser::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.userIndex = params.userIndex.unsignedShortValue; + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)clearWeekDayScheduleWithParams:(CHIPDoorLockClusterClearWeekDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeColorLoopDirectionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::ClearWeekDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)clearYearDayScheduleWithParams:(CHIPDoorLockClusterClearYearDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::ClearYearDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)getCredentialStatusWithParams:(CHIPDoorLockClusterGetCredentialStatusParams *)params - completionHandler:(void (^)(CHIPDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::GetCredentialStatus::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.credential.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - - new CHIPDoorLockClusterGetCredentialStatusResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)getHolidayScheduleWithParams:(CHIPDoorLockClusterGetHolidayScheduleParams *)params - completionHandler:(void (^)(CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::GetHolidaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); +- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)getUserWithParams:(CHIPDoorLockClusterGetUserParams *)params - completionHandler: - (void (^)(CHIPDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::GetUser::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.userIndex = params.userIndex.unsignedShortValue; - - new CHIPDoorLockClusterGetUserResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)getWeekDayScheduleWithParams:(CHIPDoorLockClusterGetWeekDayScheduleParams *)params - completionHandler:(void (^)(CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::GetWeekDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPDoorLockClusterGetWeekDayScheduleResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); +- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)getYearDayScheduleWithParams:(CHIPDoorLockClusterGetYearDayScheduleParams *)params - completionHandler:(void (^)(CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::GetYearDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - - new CHIPDoorLockClusterGetYearDayScheduleResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)lockDoorWithParams:(CHIPDoorLockClusterLockDoorParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::LockDoor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.pinCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)setCredentialWithParams:(CHIPDoorLockClusterSetCredentialParams *)params - completionHandler:(void (^)(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::SetCredential::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.credential.credentialType = static_cast>( - params.credential.credentialType.unsignedCharValue); - request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; - request.credentialData = [self asByteSpan:params.credentialData]; - if (params.userIndex == nil) { - request.userIndex.SetNull(); - } else { - auto & nonNullValue_0 = request.userIndex.SetNonNull(); - nonNullValue_0 = params.userIndex.unsignedShortValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); - } - - new CHIPDoorLockClusterSetCredentialResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)setHolidayScheduleWithParams:(CHIPDoorLockClusterSetHolidayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::SetHolidaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.holidayIndex = params.holidayIndex.unsignedCharValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - request.operatingMode - = static_cast>(params.operatingMode.unsignedCharValue); - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)setUserWithParams:(CHIPDoorLockClusterSetUserParams *)params completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::SetUser::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.operationType - = static_cast>(params.operationType.unsignedCharValue); - request.userIndex = params.userIndex.unsignedShortValue; - if (params.userName == nil) { - request.userName.SetNull(); - } else { - auto & nonNullValue_0 = request.userName.SetNonNull(); - nonNullValue_0 = [self asCharSpan:params.userName]; - } - if (params.userUniqueId == nil) { - request.userUniqueId.SetNull(); - } else { - auto & nonNullValue_0 = request.userUniqueId.SetNonNull(); - nonNullValue_0 = params.userUniqueId.unsignedIntValue; - } - if (params.userStatus == nil) { - request.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = request.userStatus.SetNonNull(); - nonNullValue_0 = static_cast>(params.userStatus.unsignedCharValue); - } - if (params.userType == nil) { - request.userType.SetNull(); - } else { - auto & nonNullValue_0 = request.userType.SetNonNull(); - nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); - } - if (params.credentialRule == nil) { - request.credentialRule.SetNull(); - } else { - auto & nonNullValue_0 = request.credentialRule.SetNonNull(); - nonNullValue_0 = static_cast>(params.credentialRule.unsignedCharValue); - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)setWeekDayScheduleWithParams:(CHIPDoorLockClusterSetWeekDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::SetWeekDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.weekDayIndex = params.weekDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.daysMask = static_cast>(params.daysMask.unsignedCharValue); - request.startHour = params.startHour.unsignedCharValue; - request.startMinute = params.startMinute.unsignedCharValue; - request.endHour = params.endHour.unsignedCharValue; - request.endMinute = params.endMinute.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)setYearDayScheduleWithParams:(CHIPDoorLockClusterSetYearDayScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::SetYearDaySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.yearDayIndex = params.yearDayIndex.unsignedCharValue; - request.userIndex = params.userIndex.unsignedShortValue; - request.localStartTime = params.localStartTime.unsignedIntValue; - request.localEndTime = params.localEndTime.unsignedIntValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)unlockDoorWithParams:(CHIPDoorLockClusterUnlockDoorParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::UnlockDoor::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - if (params != nil) { - if (params.pinCode != nil) { - auto & definedValue_0 = request.pinCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)unlockWithTimeoutWithParams:(CHIPDoorLockClusterUnlockWithTimeoutParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeColorCapabilitiesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - DoorLock::Commands::UnlockWithTimeout::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.timeout = params.timeout.unsignedShortValue; - if (params.pinCode != nil) { - auto & definedValue_0 = request.pinCode.Emplace(); - definedValue_0 = [self asByteSpan:params.pinCode]; - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeLockStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorTempPhysicalMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableDoorLockClusterDlLockStateAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTempPhysicalMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLockStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorTempPhysicalMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableDoorLockClusterDlLockStateAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeLockTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeColorTempPhysicalMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPDoorLockClusterDlLockTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTempPhysicalMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLockTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeColorTempPhysicalMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoorLockClusterDlLockTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeActuatorEnabledWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -15897,86 +15356,59 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeDoorStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - -+ (void)readAttributeDoorStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } -- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); } -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -15985,7 +15417,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -15997,16 +15429,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -16022,251 +15454,250 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPColorControlGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPColorControlGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPColorControlAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPColorControlAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPColorControlAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPColorControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: - (CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPColorControlAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: - (CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -16276,60 +15707,59 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -16339,272 +15769,298 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} +@implementation CHIPContentLauncher -+ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (chip::Controller::ClusterBase *)getCluster { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return &_cppCluster; } -- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)launchContentWithParams:(CHIPContentLauncherClusterLaunchContentParams *)params + completionHandler:(void (^)(CHIPContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ContentLauncher::Commands::LaunchContent::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.search.parameterList.count != 0) { + auto * listHolder_1 = new ListHolder(params.search.parameterList.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; } - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeMinPINCodeLengthWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.search.parameterList.count; ++i_1) { + if (![params.search.parameterList[i_1] isKindOfClass:[CHIPContentLauncherClusterParameter class]]) { + // Wrong kind of value. + return; + } + auto element_1 = (CHIPContentLauncherClusterParameter *) params.search.parameterList[i_1]; + listHolder_1->mList[i_1].type = static_castmList[i_1].type)>>( + element_1.type.unsignedCharValue); + listHolder_1->mList[i_1].value = [self asCharSpan:element_1.value]; + if (element_1.externalIDList != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].externalIDList.Emplace(); + { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + if (element_1.externalIDList.count != 0) { + auto * listHolder_4 = new ListHolder(element_1.externalIDList.count); + if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { + return; + } + listFreer.add(listHolder_4); + for (size_t i_4 = 0; i_4 < element_1.externalIDList.count; ++i_4) { + if (![element_1.externalIDList[i_4] + isKindOfClass:[CHIPContentLauncherClusterAdditionalInfo class]]) { + // Wrong kind of value. + return; + } + auto element_4 = (CHIPContentLauncherClusterAdditionalInfo *) element_1.externalIDList[i_4]; + listHolder_4->mList[i_4].name = [self asCharSpan:element_4.name]; + listHolder_4->mList[i_4].value = [self asCharSpan:element_4.value]; + } + definedValue_3 = ListType_4(listHolder_4->mList, element_1.externalIDList.count); + } else { + definedValue_3 = ListType_4(); + } + } + } } - return err; + request.search.parameterList = ListType_1(listHolder_1->mList, params.search.parameterList.count); + } else { + request.search.parameterList = ListType_1(); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + } + request.autoPlay = params.autoPlay.boolValue; + if (params.data != nil) { + auto & definedValue_0 = request.data.Emplace(); + definedValue_0 = [self asCharSpan:params.data]; + } -- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPContentLauncherClusterLaunchResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)launchURLWithParams:(CHIPContentLauncherClusterLaunchURLParams *)params + completionHandler:(void (^)(CHIPContentLauncherClusterLaunchResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ContentLauncher::Commands::LaunchURL::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.contentURL = [self asCharSpan:params.contentURL]; + if (params.displayString != nil) { + auto & definedValue_0 = request.displayString.Emplace(); + definedValue_0 = [self asCharSpan:params.displayString]; + } + if (params.brandingInformation != nil) { + auto & definedValue_0 = request.brandingInformation.Emplace(); + definedValue_0.providerName = [self asCharSpan:params.brandingInformation.providerName]; + if (params.brandingInformation.background != nil) { + auto & definedValue_2 = definedValue_0.background.Emplace(); + if (params.brandingInformation.background.imageUrl != nil) { + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.background.imageUrl]; + } + if (params.brandingInformation.background.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.background.color]; + } + if (params.brandingInformation.background.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = params.brandingInformation.background.size.width.doubleValue; + definedValue_4.height = params.brandingInformation.background.size.height.doubleValue; + definedValue_4.metric = static_cast>( + params.brandingInformation.background.size.metric.unsignedCharValue); } - return err; } - return CHIP_ERROR_NOT_FOUND; - }); + if (params.brandingInformation.logo != nil) { + auto & definedValue_2 = definedValue_0.logo.Emplace(); + if (params.brandingInformation.logo.imageUrl != nil) { + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.logo.imageUrl]; + } + if (params.brandingInformation.logo.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.logo.color]; + } + if (params.brandingInformation.logo.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = params.brandingInformation.logo.size.width.doubleValue; + definedValue_4.height = params.brandingInformation.logo.size.height.doubleValue; + definedValue_4.metric = static_cast>( + params.brandingInformation.logo.size.metric.unsignedCharValue); + } + } + if (params.brandingInformation.progressBar != nil) { + auto & definedValue_2 = definedValue_0.progressBar.Emplace(); + if (params.brandingInformation.progressBar.imageUrl != nil) { + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.imageUrl]; + } + if (params.brandingInformation.progressBar.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.progressBar.color]; + } + if (params.brandingInformation.progressBar.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = params.brandingInformation.progressBar.size.width.doubleValue; + definedValue_4.height = params.brandingInformation.progressBar.size.height.doubleValue; + definedValue_4.metric = static_cast>( + params.brandingInformation.progressBar.size.metric.unsignedCharValue); + } + } + if (params.brandingInformation.splash != nil) { + auto & definedValue_2 = definedValue_0.splash.Emplace(); + if (params.brandingInformation.splash.imageUrl != nil) { + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.splash.imageUrl]; + } + if (params.brandingInformation.splash.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.splash.color]; + } + if (params.brandingInformation.splash.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = params.brandingInformation.splash.size.width.doubleValue; + definedValue_4.height = params.brandingInformation.splash.size.height.doubleValue; + definedValue_4.metric = static_cast>( + params.brandingInformation.splash.size.metric.unsignedCharValue); + } + } + if (params.brandingInformation.waterMark != nil) { + auto & definedValue_2 = definedValue_0.waterMark.Emplace(); + if (params.brandingInformation.waterMark.imageUrl != nil) { + auto & definedValue_4 = definedValue_2.imageUrl.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.imageUrl]; + } + if (params.brandingInformation.waterMark.color != nil) { + auto & definedValue_4 = definedValue_2.color.Emplace(); + definedValue_4 = [self asCharSpan:params.brandingInformation.waterMark.color]; + } + if (params.brandingInformation.waterMark.size != nil) { + auto & definedValue_4 = definedValue_2.size.Emplace(); + definedValue_4.width = params.brandingInformation.waterMark.size.width.doubleValue; + definedValue_4.height = params.brandingInformation.waterMark.size.height.doubleValue; + definedValue_4.metric = static_cast>( + params.brandingInformation.waterMark.size.metric.unsignedCharValue); + } + } + } + + new CHIPContentLauncherClusterLaunchResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPContentLauncherAcceptHeaderListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptHeaderWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPContentLauncherAcceptHeaderListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeLanguageWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -16620,9 +16076,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -16630,46 +16086,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLanguageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -16679,280 +16138,127 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - auto successFn = Callback::FromCancelable(success); + new CHIPContentLauncherGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAutoRelockTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPContentLauncherGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return CHIP_ERROR_NOT_FOUND; }); } -- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeSoundVolumeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPDoorLockClusterDlOperatingModeAttributeCallbackBridge( + new CHIPContentLauncherAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( + new CHIPContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOperatingModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoorLockClusterDlOperatingModeAttributeCallbackBridge( + new CHIPContentLauncherAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -16962,62 +16268,60 @@ new CHIPDoorLockClusterDlOperatingModeAttributeCallbackBridge( }); } -- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoorLockSupportedOperatingModesAttributeCallbackBridge( + new CHIPContentLauncherAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( + new CHIPContentLauncherAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedOperatingModesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoorLockSupportedOperatingModesAttributeCallbackBridge( + new CHIPContentLauncherAttributeListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17027,93 +16331,57 @@ new CHIPDoorLockSupportedOperatingModesAttributeCallbackBridge( }); } -- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17123,95 +16391,59 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17221,190 +16453,253 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +@implementation CHIPDescriptor + +- (chip::Controller::ClusterBase *)getCluster { - [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + return &_cppCluster; } -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeDeviceListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDescriptorDeviceListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPDescriptorDeviceListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDescriptorDeviceListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDeviceListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPDescriptorDeviceListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Descriptor::Attributes::DeviceList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeServerListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDescriptorServerListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + new CHIPDescriptorServerListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + ++ (void)readAttributeServerListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } + new CHIPDescriptorServerListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)readAttributeClientListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDescriptorClientListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPDescriptorClientListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClientListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDescriptorClientListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; }); } -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)readAttributePartsListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPDescriptorPartsListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPDescriptorPartsListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributePartsListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPDescriptorPartsListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17414,59 +16709,13 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge( + new CHIPDescriptorGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -17480,19 +16729,19 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -17505,17 +16754,17 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge( + new CHIPDescriptorGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17528,10 +16777,10 @@ new CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge( - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge( + new CHIPDescriptorAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -17545,19 +16794,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -17570,17 +16819,17 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge( + new CHIPDescriptorAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17593,10 +16842,10 @@ new CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge( - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoorLockAttributeListListAttributeCallbackBridge( + new CHIPDescriptorAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -17608,19 +16857,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPDescriptorAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -17633,17 +16882,17 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoorLockAttributeListListAttributeCallbackBridge( + new CHIPDescriptorAttributeListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17653,59 +16902,57 @@ new CHIPDoorLockAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17715,68 +16962,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPElectricalMeasurement - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMeasurementTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -17786,303 +17024,285 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +@implementation CHIPDiagnosticLogs + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPInt32sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return &_cppCluster; } -+ (void)readAttributeTotalActivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)retrieveLogsRequestWithParams:(CHIPDiagnosticLogsClusterRetrieveLogsRequestParams *)params + completionHandler:(void (^)(CHIPDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DiagnosticLogs::Commands::RetrieveLogsRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); + } + request.intent = static_cast>(params.intent.unsignedCharValue); + request.requestedProtocol + = static_cast>(params.requestedProtocol.unsignedCharValue); + request.transferFileDesignator = [self asByteSpan:params.transferFileDesignator]; + + new CHIPDiagnosticLogsClusterRetrieveLogsResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + new CHIPDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDiagnosticLogsAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRmsVoltageMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPDiagnosticLogsAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)( +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -18092,23 +17312,23 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -18117,7 +17337,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -18129,16 +17349,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeRmsCurrentMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -18154,532 +17374,462 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation CHIPDoorLock + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + return &_cppCluster; } -- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)lockDoorWithParams:(CHIPDoorLockClusterLockDoorParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::LockDoor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + if (params != nil) { + if (params.pinCode != nil) { + auto & definedValue_0 = request.pinCode.Emplace(); + definedValue_0 = [self asByteSpan:params.pinCode]; + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeRmsCurrentMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)unlockDoorWithParams:(CHIPDoorLockClusterUnlockDoorParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::UnlockDoor::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + if (params != nil) { + if (params.pinCode != nil) { + auto & definedValue_0 = request.pinCode.Emplace(); + definedValue_0 = [self asByteSpan:params.pinCode]; + } + } -- (void)readAttributeActivePowerWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)unlockWithTimeoutWithParams:(CHIPDoorLockClusterUnlockWithTimeoutParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::UnlockWithTimeout::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.timeout = params.timeout.unsignedShortValue; + if (params.pinCode != nil) { + auto & definedValue_0 = request.pinCode.Emplace(); + definedValue_0 = [self asByteSpan:params.pinCode]; + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeActivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getLogRecordWithParams:(CHIPDoorLockClusterGetLogRecordParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetLogRecordResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetLogRecord::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); + } + request.logIndex = params.logIndex.unsignedShortValue; + + new CHIPDoorLockClusterGetLogRecordResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)setPINCodeWithParams:(CHIPDoorLockClusterSetPINCodeParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetPINCode::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.userId = params.userId.unsignedShortValue; + if (params.userStatus == nil) { + request.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = request.userStatus.SetNonNull(); + nonNullValue_0 = static_cast>(params.userStatus.unsignedCharValue); + } + if (params.userType == nil) { + request.userType.SetNull(); + } else { + auto & nonNullValue_0 = request.userType.SetNonNull(); + nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); + } + request.pin = [self asByteSpan:params.pin]; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)getPINCodeWithParams:(CHIPDoorLockClusterGetPINCodeParams *)params + completionHandler: + (void (^)(CHIPDoorLockClusterGetPINCodeResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetPINCode::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.userId = params.userId.unsignedShortValue; + + new CHIPDoorLockClusterGetPINCodeResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeActivePowerMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)clearPINCodeWithParams:(CHIPDoorLockClusterClearPINCodeParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearPINCode::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.pinSlotIndex = params.pinSlotIndex.unsignedShortValue; -- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeActivePowerMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)clearAllPINCodesWithCompletionHandler:(StatusCompletion)completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self clearAllPINCodesWithParams:nil completionHandler:completionHandler]; } - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)clearAllPINCodesWithParams:(CHIPDoorLockClusterClearAllPINCodesParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearAllPINCodes::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setUserStatusWithParams:(CHIPDoorLockClusterSetUserStatusParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetUserStatus::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.userId = params.userId.unsignedShortValue; + request.userStatus = static_cast>(params.userStatus.unsignedCharValue); + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)getUserStatusWithParams:(CHIPDoorLockClusterGetUserStatusParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetUserStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetUserStatus::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.userId = params.userId.unsignedShortValue; + + new CHIPDoorLockClusterGetUserStatusResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setWeekDayScheduleWithParams:(CHIPDoorLockClusterSetWeekDayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetWeekDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + request.daysMask = static_cast>(params.daysMask.unsignedCharValue); + request.startHour = params.startHour.unsignedCharValue; + request.startMinute = params.startMinute.unsignedCharValue; + request.endHour = params.endHour.unsignedCharValue; + request.endMinute = params.endMinute.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getWeekDayScheduleWithParams:(CHIPDoorLockClusterGetWeekDayScheduleParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge( + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetWeekDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + + new CHIPDoorLockClusterGetWeekDayScheduleResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)clearWeekDayScheduleWithParams:(CHIPDoorLockClusterClearWeekDayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearWeekDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.weekDayIndex = params.weekDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)setYearDayScheduleWithParams:(CHIPDoorLockClusterSetYearDayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetYearDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; + request.localStartTime = params.localStartTime.unsignedIntValue; + request.localEndTime = params.localEndTime.unsignedIntValue; -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getYearDayScheduleWithParams:(CHIPDoorLockClusterGetYearDayScheduleParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetYearDaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -@end - -@implementation CHIPEthernetNetworkDiagnostics + } + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; + new CHIPDoorLockClusterGetYearDayScheduleResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self resetCountsWithParams:nil completionHandler:completionHandler]; -} -- (void)resetCountsWithParams:(CHIPEthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)clearYearDayScheduleWithParams:(CHIPDoorLockClusterClearYearDayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; + DoorLock::Commands::ClearYearDaySchedule::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.yearDayIndex = params.yearDayIndex.unsignedCharValue; + request.userIndex = params.userIndex.unsignedShortValue; new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -18694,688 +17844,603 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setHolidayScheduleWithParams:(CHIPDoorLockClusterSetHolidayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetHolidaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.holidayIndex = params.holidayIndex.unsignedCharValue; + request.localStartTime = params.localStartTime.unsignedIntValue; + request.localEndTime = params.localEndTime.unsignedIntValue; + request.operatingMode + = static_cast>(params.operatingMode.unsignedCharValue); + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributePHYRateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getHolidayScheduleWithParams:(CHIPDoorLockClusterGetHolidayScheduleParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetHolidaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.holidayIndex = params.holidayIndex.unsignedCharValue; -- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPNullableBooleanAttributeCallbackBridge( + new CHIPDoorLockClusterGetHolidayScheduleResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)clearHolidayScheduleWithParams:(CHIPDoorLockClusterClearHolidayScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearHolidaySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.holidayIndex = params.holidayIndex.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeFullDuplexWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setUserTypeWithParams:(CHIPDoorLockClusterSetUserTypeParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetUserType::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + } + request.userId = params.userId.unsignedShortValue; + request.userType = static_cast>(params.userType.unsignedCharValue); -- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributePacketRxCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getUserTypeWithParams:(CHIPDoorLockClusterGetUserTypeParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetUserTypeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetUserType::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + } + request.userId = params.userId.unsignedShortValue; -- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPDoorLockClusterGetUserTypeResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributePacketTxCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setRFIDCodeWithParams:(CHIPDoorLockClusterSetRFIDCodeParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetRFIDCode::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.userId = params.userId.unsignedShortValue; + if (params.userStatus == nil) { + request.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = request.userStatus.SetNonNull(); + nonNullValue_0 = static_cast>(params.userStatus.unsignedCharValue); + } + if (params.userType == nil) { + request.userType.SetNull(); + } else { + auto & nonNullValue_0 = request.userType.SetNonNull(); + nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); + } + request.rfidCode = [self asByteSpan:params.rfidCode]; -- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeTxErrCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getRFIDCodeWithParams:(CHIPDoorLockClusterGetRFIDCodeParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetRFIDCodeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetRFIDCode::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} + } + request.userId = params.userId.unsignedShortValue; -- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDoorLockClusterGetRFIDCodeResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)clearRFIDCodeWithParams:(CHIPDoorLockClusterClearRFIDCodeParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearRFIDCode::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.rfidSlotIndex = params.rfidSlotIndex.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeCollisionCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)clearAllRFIDCodesWithCompletionHandler:(StatusCompletion)completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self clearAllRFIDCodesWithParams:nil completionHandler:completionHandler]; } - -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)clearAllRFIDCodesWithParams:(CHIPDoorLockClusterClearAllRFIDCodesParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearAllRFIDCodes::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeOverrunCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setUserWithParams:(CHIPDoorLockClusterSetUserParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetUser::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.operationType + = static_cast>(params.operationType.unsignedCharValue); + request.userIndex = params.userIndex.unsignedShortValue; + if (params.userName == nil) { + request.userName.SetNull(); + } else { + auto & nonNullValue_0 = request.userName.SetNonNull(); + nonNullValue_0 = [self asCharSpan:params.userName]; + } + if (params.userUniqueId == nil) { + request.userUniqueId.SetNull(); + } else { + auto & nonNullValue_0 = request.userUniqueId.SetNonNull(); + nonNullValue_0 = params.userUniqueId.unsignedIntValue; + } + if (params.userStatus == nil) { + request.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = request.userStatus.SetNonNull(); + nonNullValue_0 = static_cast>(params.userStatus.unsignedCharValue); + } + if (params.userType == nil) { + request.userType.SetNull(); + } else { + auto & nonNullValue_0 = request.userType.SetNonNull(); + nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); + } + if (params.credentialRule == nil) { + request.credentialRule.SetNull(); + } else { + auto & nonNullValue_0 = request.credentialRule.SetNonNull(); + nonNullValue_0 = static_cast>(params.credentialRule.unsignedCharValue); + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getUserWithParams:(CHIPDoorLockClusterGetUserParams *)params + completionHandler: + (void (^)(CHIPDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - new CHIPNullableBooleanAttributeCallbackBridge( + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetUser::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.userIndex = params.userIndex.unsignedShortValue; + + new CHIPDoorLockClusterGetUserResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)clearUserWithParams:(CHIPDoorLockClusterClearUserParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearUser::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.userIndex = params.userIndex.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeCarrierDetectWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setCredentialWithParams:(CHIPDoorLockClusterSetCredentialParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::SetCredential::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.operationType + = static_cast>(params.operationType.unsignedCharValue); + request.credential.credentialType = static_cast>( + params.credential.credentialType.unsignedCharValue); + request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; + request.credentialData = [self asByteSpan:params.credentialData]; + if (params.userIndex == nil) { + request.userIndex.SetNull(); + } else { + auto & nonNullValue_0 = request.userIndex.SetNonNull(); + nonNullValue_0 = params.userIndex.unsignedShortValue; + } + if (params.userStatus == nil) { + request.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = request.userStatus.SetNonNull(); + nonNullValue_0 = static_cast>(params.userStatus.unsignedCharValue); + } + if (params.userType == nil) { + request.userType.SetNull(); + } else { + auto & nonNullValue_0 = request.userType.SetNonNull(); + nonNullValue_0 = static_cast>(params.userType.unsignedCharValue); + } -- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDoorLockClusterSetCredentialResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)getCredentialStatusWithParams:(CHIPDoorLockClusterGetCredentialStatusParams *)params + completionHandler:(void (^)(CHIPDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::GetCredentialStatus::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.credential.credentialType = static_cast>( + params.credential.credentialType.unsignedCharValue); + request.credential.credentialIndex = params.credential.credentialIndex.unsignedShortValue; + + new CHIPDoorLockClusterGetCredentialStatusResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeTimeSinceResetWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)clearCredentialWithParams:(CHIPDoorLockClusterClearCredentialParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ClearCredential::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + if (params.credential == nil) { + request.credential.SetNull(); + } else { + auto & nonNullValue_0 = request.credential.SetNonNull(); + nonNullValue_0.credentialType = static_cast>( + params.credential.credentialType.unsignedCharValue); + nonNullValue_0.credentialIndex = params.credential.credentialIndex.unsignedShortValue; + } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)operatingEventNotificationWithParams:(CHIPDoorLockClusterOperatingEventNotificationParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::OperatingEventNotification::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.operationEventSource = params.operationEventSource.unsignedCharValue; + request.operationEventCode = params.operationEventCode.unsignedCharValue; + request.userId = params.userId.unsignedShortValue; + request.pin = [self asByteSpan:params.pin]; + request.localTime = params.localTime.unsignedIntValue; + if (params.data != nil) { + auto & definedValue_0 = request.data.Emplace(); + definedValue_0 = [self asCharSpan:params.data]; + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)programmingEventNotificationWithParams:(CHIPDoorLockClusterProgrammingEventNotificationParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + DoorLock::Commands::ProgrammingEventNotification::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.programEventSource = params.programEventSource.unsignedCharValue; + request.programEventCode = params.programEventCode.unsignedCharValue; + request.userId = params.userId.unsignedShortValue; + request.pin = [self asByteSpan:params.pin]; + request.userType = static_cast>(params.userType.unsignedCharValue); + request.userStatus = static_cast>(params.userStatus.unsignedCharValue); + request.localTime = params.localTime.unsignedIntValue; + if (params.data != nil) { + auto & definedValue_0 = request.data.Emplace(); + definedValue_0 = [self asCharSpan:params.data]; + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLockStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + new CHIPNullableDoorLockClusterDlLockStateAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableDoorLockClusterDlLockStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLockStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + new CHIPNullableDoorLockClusterDlLockStateAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -19385,60 +18450,59 @@ new CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLockTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( + new CHIPDoorLockClusterDlLockTypeAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockClusterDlLockTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLockTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( + new CHIPDoorLockClusterDlLockTypeAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -19448,57 +18512,59 @@ new CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActuatorEnabledWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -19508,95 +18574,86 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDoorStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableDoorLockClusterDlDoorStateAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDoorStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPNullableDoorLockClusterDlDoorStateAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -@end - -@implementation CHIPFanControl - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFanControlClusterFanModeTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -19612,9 +18669,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -19622,75 +18679,75 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFanModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDoorOpenEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFanControlClusterFanModeTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -19706,9 +18763,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -19716,76 +18773,75 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFanModeSequenceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDoorClosedEventsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributePercentSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -19801,9 +18857,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -19811,48 +18867,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePercentSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOpenPeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -19862,59 +18916,60 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfLogRecordsSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::NumberOfLogRecordsSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfLogRecordsSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfLogRecordsSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePercentCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfLogRecordsSupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfLogRecordsSupported::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -19924,57 +18979,60 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSpeedMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -19984,90 +19042,60 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSpeedSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20077,58 +19105,60 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSpeedCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20138,22 +19168,24 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -20162,7 +19194,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -20174,16 +19206,17 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeRockSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -20199,54 +19232,24 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -20255,7 +19258,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -20267,16 +19270,17 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeRockSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -20292,22 +19296,24 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -20316,7 +19322,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -20328,16 +19334,16 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeWindSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -20353,54 +19359,85 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + ++ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); +- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -20409,7 +19446,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -20421,16 +19458,16 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeWindSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinPINCodeLengthWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -20446,190 +19483,186 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFanControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFanControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFanControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFanControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFanControlAttributeListListAttributeCallbackBridge( + new CHIPDoorLockCredentialRulesSupportAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPFanControlAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCredentialRulesSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFanControlAttributeListListAttributeCallbackBridge( + new CHIPDoorLockCredentialRulesSupportAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20639,57 +19672,91 @@ new CHIPFanControlAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEnableLoggingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::EnableLogging::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableLoggingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + [self writeAttributeEnableLoggingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeEnableLoggingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableLogging::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeEnableLoggingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnableLogging::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnableLoggingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableLogging::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20699,59 +19766,89 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLanguageWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLanguageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20761,67 +19858,184 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end +- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} -@implementation CHIPFixedLabel +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } -- (chip::Controller::ClusterBase *)getCluster + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return &_cppCluster; + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)readAttributeLabelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLEDSettingsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFixedLabelLabelListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPFixedLabelLabelListListAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLabelListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAutoRelockTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFixedLabelLabelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20831,62 +20045,186 @@ new CHIPFixedLabelLabelListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFixedLabelGeneratedCommandListListAttributeCallbackBridge( + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSoundVolumeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDoorLockClusterDlOperatingModeAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( + [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockClusterDlOperatingModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOperatingModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFixedLabelGeneratedCommandListListAttributeCallbackBridge( + new CHIPDoorLockClusterDlOperatingModeAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20896,62 +20234,62 @@ new CHIPFixedLabelGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFixedLabelAcceptedCommandListListAttributeCallbackBridge( + new CHIPDoorLockSupportedOperatingModesAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedOperatingModesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFixedLabelAcceptedCommandListListAttributeCallbackBridge( + new CHIPDoorLockSupportedOperatingModesAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -20961,60 +20299,62 @@ new CHIPFixedLabelAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFixedLabelAttributeListListAttributeCallbackBridge( + new CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFixedLabelAttributeListListAttributeCallbackBridge( + new CHIPDoorLockDefaultConfigurationRegisterAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21024,131 +20364,93 @@ new CHIPFixedLabelAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -@end - -@implementation CHIPFlowMeasurement - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} + } -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21158,60 +20460,93 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21221,60 +20556,93 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21284,57 +20652,95 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21344,62 +20750,97 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( + new CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( + new CHIPDoorLockLocalProgrammingFeaturesAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21409,187 +20850,284 @@ new CHIPFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFlowMeasurementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { + [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFlowMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSendPINOverTheAirWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21599,114 +21137,122 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPGeneralCommissioning - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)armFailSafeWithParams:(CHIPGeneralCommissioningClusterArmFailSafeParams *)params - completionHandler:(void (^)(CHIPGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GeneralCommissioning::Commands::ArmFailSafe::Type request; + [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - request.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; - request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - new CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)commissioningCompleteWithCompletionHandler: - (void (^)(CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self commissioningCompleteWithParams:nil completionHandler:completionHandler]; -} -- (void)commissioningCompleteWithParams:(CHIPGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params - completionHandler: - (void (^)(CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GeneralCommissioning::Commands::CommissioningComplete::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn - = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)setRegulatoryConfigWithParams:(CHIPGeneralCommissioningClusterSetRegulatoryConfigParams *)params - completionHandler:(void (^)(CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.newRegulatoryConfig - = static_cast>(params.newRegulatoryConfig.unsignedCharValue); - request.countryCode = [self asCharSpan:params.countryCode]; - request.breadcrumb = params.breadcrumb.unsignedLongLongValue; - - new CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -21722,9 +21268,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -21732,46 +21278,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBreadcrumbWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21781,130 +21330,190 @@ new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeBasicCommissioningInfoWithCompletionHandler: - (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( + new CHIPDoorLockAlarmMaskAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::AlarmMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void) - subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeAlarmMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( + [self writeAttributeAlarmMaskWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeAlarmMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::AlarmMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeAlarmMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockAlarmMaskAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::AlarmMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockAlarmMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAlarmMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPDoorLockAlarmMaskAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::AlarmMask::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeKeypadOperationEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( + new CHIPDoorLockKeypadOperationEventMaskAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::KeypadOperationEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeKeypadOperationEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( + [self writeAttributeKeypadOperationEventMaskWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeKeypadOperationEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::KeypadOperationEventMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeKeypadOperationEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockKeypadOperationEventMaskAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::KeypadOperationEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockKeypadOperationEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRegulatoryConfigWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeKeypadOperationEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( + new CHIPDoorLockKeypadOperationEventMaskAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + using TypeInfo = DoorLock::Attributes::KeypadOperationEventMask::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21914,62 +21523,97 @@ new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge }); } -- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRemoteOperationEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( + new CHIPDoorLockRemoteOperationEventMaskAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::RemoteOperationEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRemoteOperationEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( + [self writeAttributeRemoteOperationEventMaskWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeRemoteOperationEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::RemoteOperationEventMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeRemoteOperationEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockRemoteOperationEventMaskAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::RemoteOperationEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockRemoteOperationEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLocationCapabilityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRemoteOperationEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( + new CHIPDoorLockRemoteOperationEventMaskAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + using TypeInfo = DoorLock::Attributes::RemoteOperationEventMask::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -21979,125 +21623,97 @@ new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge }); } -- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeManualOperationEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDoorLockManualOperationEventMaskAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::ManualOperationEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeManualOperationEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + [self writeAttributeManualOperationEventMaskWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - -+ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeManualOperationEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} + } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::ManualOperationEventMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeManualOperationEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPDoorLockManualOperationEventMaskAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::ManualOperationEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockManualOperationEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeManualOperationEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( + new CHIPDoorLockManualOperationEventMaskAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::ManualOperationEventMask::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22107,62 +21723,95 @@ new CHIPGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRFIDOperationEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( + new CHIPDoorLockRFIDOperationEventMaskAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::RFIDOperationEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRFIDOperationEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( + [self writeAttributeRFIDOperationEventMaskWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeRFIDOperationEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::RFIDOperationEventMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeRFIDOperationEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockRFIDOperationEventMaskAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::RFIDOperationEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockRFIDOperationEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRFIDOperationEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( + new CHIPDoorLockRFIDOperationEventMaskAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::RFIDOperationEventMask::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22172,60 +21821,97 @@ new CHIPGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeKeypadProgrammingEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningAttributeListListAttributeCallbackBridge( + new CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::KeypadProgrammingEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeKeypadProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + [self writeAttributeKeypadProgrammingEventMaskWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeKeypadProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::KeypadProgrammingEventMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeKeypadProgrammingEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::KeypadProgrammingEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeKeypadProgrammingEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGeneralCommissioningAttributeListListAttributeCallbackBridge( + new CHIPDoorLockKeypadProgrammingEventMaskAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::KeypadProgrammingEventMask::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22235,132 +21921,197 @@ new CHIPGeneralCommissioningAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRemoteProgrammingEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::RemoteProgrammingEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRemoteProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + [self writeAttributeRemoteProgrammingEventMaskWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeRemoteProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::RemoteProgrammingEventMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeRemoteProgrammingEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::RemoteProgrammingEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRemoteProgrammingEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPDoorLockRemoteProgrammingEventMaskAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::RemoteProgrammingEventMask::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -@end - -@implementation CHIPGeneralDiagnostics - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeRFIDProgrammingEventMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::RFIDProgrammingEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeRFIDProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - auto successFn = Callback::FromCancelable(success); + [self writeAttributeRFIDProgrammingEventMaskWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeRFIDProgrammingEventMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::RFIDProgrammingEventMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRFIDProgrammingEventMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( + new CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::RFIDProgrammingEventMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNetworkInterfacesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRFIDProgrammingEventMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( + new CHIPDoorLockRFIDProgrammingEventMaskAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + using TypeInfo = DoorLock::Attributes::RFIDProgrammingEventMask::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22370,58 +22121,250 @@ new CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( }); } -- (void)readAttributeRebootCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRebootCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDoorLockGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDoorLockAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDoorLockAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPDoorLockAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22431,56 +22374,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeUpTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + using TypeInfo = DoorLock::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22490,24 +22436,89 @@ new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation CHIPElectricalMeasurement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)getProfileInfoCommandWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self getProfileInfoCommandWithParams:nil completionHandler:completionHandler]; +} +- (void)getProfileInfoCommandWithParams:(CHIPElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ElectricalMeasurement::Commands::GetProfileInfoCommand::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)getMeasurementProfileCommandWithParams:(CHIPElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.attributeId = params.attributeId.unsignedShortValue; + request.startTime = params.startTime.unsignedIntValue; + request.numberOfIntervals = params.numberOfIntervals.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -22516,7 +22527,7 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -22528,16 +22539,16 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeTotalOperationalHoursWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasurementTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -22553,58 +22564,57 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBootReasonsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -22614,446 +22624,420 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcVoltageMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeActiveRadioFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcVoltageMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcCurrentMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcCurrentMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDcPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcPowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGeneralDiagnosticsAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcPowerMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -23063,372 +23047,271 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPGroupKeyManagement - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)keySetReadWithParams:(CHIPGroupKeyManagementClusterKeySetReadParams *)params - completionHandler:(void (^)(CHIPGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRead::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - - new CHIPGroupKeyManagementClusterKeySetReadResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)keySetReadAllIndicesWithParams:(CHIPGroupKeyManagementClusterKeySetReadAllIndicesParams *)params - completionHandler:(void (^)(CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeDcPowerMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.groupKeySetIDs.count != 0) { - auto * listHolder_0 = new ListHolder(params.groupKeySetIDs.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.groupKeySetIDs.count; ++i_0) { - if (![params.groupKeySetIDs[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return; - } - auto element_0 = (NSNumber *) params.groupKeySetIDs[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - request.groupKeySetIDs = ListType_0(listHolder_0->mList, params.groupKeySetIDs.count); - } else { - request.groupKeySetIDs = ListType_0(); + return err; } - } - - new CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)keySetRemoveWithParams:(CHIPGroupKeyManagementClusterKeySetRemoveParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRemove::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)keySetWriteWithParams:(CHIPGroupKeyManagementClusterKeySetWriteParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetWrite::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; - request.groupKeySet.groupKeySecurityPolicy - = static_cast>( - params.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); - if (params.groupKeySet.epochKey0 == nil) { - request.groupKeySet.epochKey0.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey0.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey0]; - } - if (params.groupKeySet.epochStartTime0 == nil) { - request.groupKeySet.epochStartTime0.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime0.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime0.unsignedLongLongValue; - } - if (params.groupKeySet.epochKey1 == nil) { - request.groupKeySet.epochKey1.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey1.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey1]; - } - if (params.groupKeySet.epochStartTime1 == nil) { - request.groupKeySet.epochStartTime1.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime1.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime1.unsignedLongLongValue; - } - if (params.groupKeySet.epochKey2 == nil) { - request.groupKeySet.epochKey2.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey2.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey2]; - } - if (params.groupKeySet.epochStartTime2 == nil) { - request.groupKeySet.epochStartTime2.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime2.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeGroupKeyMapWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[CHIPGroupKeyManagementClusterGroupKeyMapStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (CHIPGroupKeyManagementClusterGroupKeyMapStruct *) value[i_0]; - listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; - listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGroupKeyMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcVoltageDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGroupTableWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGroupKeyManagementGroupTableListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGroupTableWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGroupKeyManagementGroupTableListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -23437,7 +23320,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -23449,16 +23332,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcCurrentDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -23474,24 +23357,23 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -23500,7 +23382,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -23512,16 +23394,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcPowerMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -23537,216 +23419,208 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDcPowerDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGroupKeyManagementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcFrequencyMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGroupKeyManagementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -23755,7 +23629,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -23767,16 +23641,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcFrequencyMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -23792,237 +23666,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPGroups - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)addGroupWithParams:(CHIPGroupsClusterAddGroupParams *)params - completionHandler: - (void (^)(CHIPGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Groups::Commands::AddGroup::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - request.groupName = [self asCharSpan:params.groupName]; - - new CHIPGroupsClusterAddGroupResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)addGroupIfIdentifyingWithParams:(CHIPGroupsClusterAddGroupIfIdentifyingParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Groups::Commands::AddGroupIfIdentifying::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - request.groupName = [self asCharSpan:params.groupName]; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)getGroupMembershipWithParams:(CHIPGroupsClusterGetGroupMembershipParams *)params - completionHandler:(void (^)(CHIPGroupsClusterGetGroupMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Groups::Commands::GetGroupMembership::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.groupList.count != 0) { - auto * listHolder_0 = new ListHolder(params.groupList.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.groupList.count; ++i_0) { - if (![params.groupList[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return; - } - auto element_0 = (NSNumber *) params.groupList[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; - } - request.groupList = ListType_0(listHolder_0->mList, params.groupList.count); - } else { - request.groupList = ListType_0(); - } - } - - new CHIPGroupsClusterGetGroupMembershipResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)removeAllGroupsWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self removeAllGroupsWithParams:nil completionHandler:completionHandler]; -} -- (void)removeAllGroupsWithParams:(CHIPGroupsClusterRemoveAllGroupsParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Groups::Commands::RemoveAllGroups::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)removeGroupWithParams:(CHIPGroupsClusterRemoveGroupParams *)params - completionHandler: - (void (^)(CHIPGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Groups::Commands::RemoveGroup::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - - new CHIPGroupsClusterRemoveGroupResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)viewGroupWithParams:(CHIPGroupsClusterViewGroupParams *)params - completionHandler: - (void (^)(CHIPGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Groups::Commands::ViewGroup::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - - new CHIPGroupsClusterViewGroupResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNameSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNeutralCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24032,189 +23728,183 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGroupsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTotalActivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGroupsGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGroupsAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTotalReactivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGroupsAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPGroupsAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPGroupsAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTotalApparentPowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPGroupsAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24224,59 +23914,60 @@ new CHIPGroupsAttributeListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24286,180 +23977,60 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPIdentify - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)identifyWithParams:(CHIPIdentifyClusterIdentifyParams *)params completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Identify::Commands::Identify::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.identifyTime = params.identifyTime.unsignedShortValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)identifyQueryWithCompletionHandler:(void (^)(CHIPIdentifyClusterIdentifyQueryResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self identifyQueryWithParams:nil completionHandler:completionHandler]; -} -- (void)identifyQueryWithParams:(CHIPIdentifyClusterIdentifyQueryParams * _Nullable)params - completionHandler:(void (^)(CHIPIdentifyClusterIdentifyQueryResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Identify::Commands::IdentifyQuery::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPIdentifyClusterIdentifyQueryResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)triggerEffectWithParams:(CHIPIdentifyClusterTriggerEffectParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Identify::Commands::TriggerEffect::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.effectIdentifier - = static_cast>(params.effectIdentifier.unsignedCharValue); - request.effectVariant - = static_cast>(params.effectVariant.unsignedCharValue); - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeIdentifyTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24469,58 +24040,60 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeIdentifyTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24530,252 +24103,249 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPIdentifyGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPIdentifyGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPIdentifyAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPIdentifyAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPIdentifyAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPIdentifyAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPIdentifyAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24785,69 +24355,60 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPIlluminanceMeasurement - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24857,60 +24418,60 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24920,60 +24481,60 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -24983,57 +24544,60 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25043,60 +24607,60 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLightSensorTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25106,252 +24670,184 @@ new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPIlluminanceMeasurementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPIlluminanceMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributePowerMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25361,284 +24857,184 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPKeypadInput - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)sendKeyWithParams:(CHIPKeypadInputClusterSendKeyParams *)params - completionHandler: - (void (^)(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - KeypadInput::Commands::SendKey::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.keyCode = static_cast>(params.keyCode.unsignedCharValue); - - new CHIPKeypadInputClusterSendKeyResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPKeypadInputGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePowerDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPKeypadInputGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPKeypadInputAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPKeypadInputAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPKeypadInputAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPKeypadInputAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25648,290 +25044,60 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPLevelControl - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)moveWithParams:(CHIPLevelControlClusterMoveParams *)params completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - LevelControl::Commands::Move::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)moveToLevelWithParams:(CHIPLevelControlClusterMoveToLevelParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - LevelControl::Commands::MoveToLevel::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.level = params.level.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)moveToLevelWithOnOffWithParams:(CHIPLevelControlClusterMoveToLevelWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - LevelControl::Commands::MoveToLevelWithOnOff::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.level = params.level.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)moveWithOnOffWithParams:(CHIPLevelControlClusterMoveWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - LevelControl::Commands::MoveWithOnOff::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.moveMode = static_cast>(params.moveMode.unsignedCharValue); - request.rate = params.rate.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stepWithParams:(CHIPLevelControlClusterStepParams *)params completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - LevelControl::Commands::Step::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.stepMode = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stepWithOnOffWithParams:(CHIPLevelControlClusterStepWithOnOffParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - LevelControl::Commands::StepWithOnOff::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.stepMode = static_cast>(params.stepMode.unsignedCharValue); - request.stepSize = params.stepSize.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stopWithParams:(CHIPLevelControlClusterStopParams *)params completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - LevelControl::Commands::Stop::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.optionMask = params.optionMask.unsignedCharValue; - request.optionOverride = params.optionOverride.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stopWithOnOffWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self stopWithOnOffWithParams:nil completionHandler:completionHandler]; -} -- (void)stopWithOnOffWithParams:(CHIPLevelControlClusterStopWithOnOffParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - LevelControl::Commands::StopWithOnOff::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInstantaneousVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -25941,23 +25107,24 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -25966,7 +25133,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -25978,16 +25145,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeRemainingTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -26003,57 +25170,60 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26063,57 +25233,60 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26123,59 +25296,59 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInstantaneousPowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26185,22 +25358,22 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -26209,7 +25382,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -26221,16 +25394,15 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeMinFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -26246,22 +25418,23 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -26270,7 +25443,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -26282,16 +25455,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeMaxFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -26307,88 +25480,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOptionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26398,56 +25542,22 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -26456,7 +25566,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -26468,16 +25578,15 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeOnOffTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -26493,94 +25602,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOnLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsCurrentMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26590,97 +25664,59 @@ new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOnTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsCurrentMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26690,97 +25726,58 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActivePowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOffTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26790,97 +25787,59 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeDefaultMoveRateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActivePowerMinWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26890,98 +25849,59 @@ new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeStartUpCurrentLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActivePowerMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -26991,250 +25911,121 @@ new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPLevelControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPLevelControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPLevelControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPLevelControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPLevelControlAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPLevelControlAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeReactivePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPLevelControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeApparentPowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -27244,59 +26035,58 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePowerFactorWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePowerFactorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -27306,33 +26096,27 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPLocalizationConfiguration - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -27348,9 +26132,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -27358,47 +26142,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeActiveLocaleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -27408,219 +26194,350 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedLocalesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -27629,7 +26546,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -27641,16 +26558,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -27666,253 +26583,245 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPLowPower - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)sleepWithCompletionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self sleepWithParams:nil completionHandler:completionHandler]; + [self writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)sleepWithParams:(CHIPLowPowerClusterSleepParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - LowPower::Commands::Sleep::Type request; + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPLowPowerGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPLowPowerGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPLowPowerAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPLowPowerAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPLowPowerAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPLowPowerAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcVoltageDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPLowPowerAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -27921,7 +26830,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -27933,16 +26842,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -27958,176 +26867,183 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPMediaInput - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)hideInputStatusWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self hideInputStatusWithParams:nil completionHandler:completionHandler]; -} -- (void)hideInputStatusWithParams:(CHIPMediaInputClusterHideInputStatusParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaInput::Commands::HideInputStatus::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)renameInputWithParams:(CHIPMediaInputClusterRenameInputParams *)params completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeAcCurrentDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaInput::Commands::RenameInput::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.index = params.index.unsignedCharValue; - request.name = [self asCharSpan:params.name]; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)selectInputWithParams:(CHIPMediaInputClusterSelectInputParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaInput::Commands::SelectInput::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.index = params.index.unsignedCharValue; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)showInputStatusWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self showInputStatusWithParams:nil completionHandler:completionHandler]; -} -- (void)showInputStatusWithParams:(CHIPMediaInputClusterShowInputStatusParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeAcPowerMultiplierWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaInput::Commands::ShowInputStatus::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeInputListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPMediaInputInputListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPMediaInputInputListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInputListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcPowerDivisorWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPMediaInputInputListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28137,22 +27053,55 @@ new CHIPMediaInputInputListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -28161,7 +27110,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -28173,16 +27122,16 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentInputWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -28198,252 +27147,278 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPMediaInputGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVoltageOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPMediaInputGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPMediaInputAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPMediaInputAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPMediaInputAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPMediaInputAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPMediaInputAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcVoltageOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28453,415 +27428,311 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPMediaPlayback - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)fastForwardWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self fastForwardWithParams:nil completionHandler:completionHandler]; + new CHIPInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)fastForwardWithParams:(CHIPMediaPlaybackClusterFastForwardParams * _Nullable)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler + ++ (void)readAttributeAcCurrentOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::FastForward::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)nextWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self nextWithParams:nil completionHandler:completionHandler]; + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)nextWithParams:(CHIPMediaPlaybackClusterNextParams * _Nullable)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Next::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); +- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)pauseWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self pauseWithParams:nil completionHandler:completionHandler]; -} -- (void)pauseWithParams:(CHIPMediaPlaybackClusterPauseParams * _Nullable)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Pause::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)playWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self playWithParams:nil completionHandler:completionHandler]; + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)playWithParams:(CHIPMediaPlaybackClusterPlayParams * _Nullable)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Play::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); +- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)previousWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self previousWithParams:nil completionHandler:completionHandler]; -} -- (void)previousWithParams:(CHIPMediaPlaybackClusterPreviousParams * _Nullable)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Previous::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)rewindWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self rewindWithParams:nil completionHandler:completionHandler]; + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)rewindWithParams:(CHIPMediaPlaybackClusterRewindParams * _Nullable)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Rewind::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)seekWithParams:(CHIPMediaPlaybackClusterSeekParams *)params - completionHandler: - (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::Seek::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.position = params.position.unsignedLongLongValue; - - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)skipBackwardWithParams:(CHIPMediaPlaybackClusterSkipBackwardParams *)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::SkipBackward::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)skipForwardWithParams:(CHIPMediaPlaybackClusterSkipForwardParams *)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::SkipForward::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; - - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)startOverWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self startOverWithParams:nil completionHandler:completionHandler]; -} -- (void)startOverWithParams:(CHIPMediaPlaybackClusterStartOverParams * _Nullable)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::StartOver::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)stopPlaybackWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self stopPlaybackWithParams:nil completionHandler:completionHandler]; -} -- (void)stopPlaybackWithParams:(CHIPMediaPlaybackClusterStopPlaybackParams * _Nullable)params - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - MediaPlayback::Commands::StopPlayback::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeStartTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeStartTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28871,58 +27742,60 @@ new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeDurationWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeDurationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -28932,123 +27805,122 @@ new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPMediaPlaybackSampledPositionStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSampledPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPMediaPlaybackSampledPositionStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)( +- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPFloatAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePlaybackSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRmsVoltageSagWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29058,59 +27930,59 @@ new CHIPFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSeekRangeEndWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageSwellWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29120,60 +27992,59 @@ new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSeekRangeStartWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29183,216 +28054,212 @@ new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, +- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPMediaPlaybackAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPMediaPlaybackAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -29401,7 +28268,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -29413,16 +28280,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -29438,93 +28305,122 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPModeSelect - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)changeToModeWithParams:(CHIPModeSelectClusterChangeToModeParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - ModeSelect::Commands::ChangeToMode::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.newMode = params.newMode.unsignedCharValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29534,60 +28430,60 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeStandardNamespaceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29597,122 +28493,122 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPModeSelectSupportedModesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedModesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPModeSelectSupportedModesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActivePowerPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29722,96 +28618,60 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeStartUpModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29821,94 +28681,60 @@ new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOnModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -29918,250 +28744,249 @@ new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPModeSelectGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPModeSelectGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPModeSelectAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPModeSelectAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPModeSelectAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPModeSelectAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePowerFactorPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPModeSelectAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -30171,23 +28996,24 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -30196,7 +29022,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -30208,16 +29034,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -30233,241 +29059,312 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPNetworkCommissioning - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)addOrUpdateThreadNetworkWithParams:(CHIPNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.operationalDataset = [self asByteSpan:params.operationalDataset]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - new CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)addOrUpdateWiFiNetworkWithParams:(CHIPNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.ssid = [self asByteSpan:params.ssid]; - request.credentials = [self asByteSpan:params.credentials]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)connectNetworkWithParams:(CHIPNetworkCommissioningClusterConnectNetworkParams *)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::ConnectNetwork::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.networkID = [self asByteSpan:params.networkID]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - - new CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)removeNetworkWithParams:(CHIPNetworkCommissioningClusterRemoveNetworkParams *)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::RemoveNetwork::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.networkID = [self asByteSpan:params.networkID]; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)reorderNetworkWithParams:(CHIPNetworkCommissioningClusterReorderNetworkParams *)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::ReorderNetwork::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.networkID = [self asByteSpan:params.networkID]; - request.networkIndex = params.networkIndex.unsignedCharValue; - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)scanNetworksWithParams:(CHIPNetworkCommissioningClusterScanNetworksParams * _Nullable)params - completionHandler:(void (^)(CHIPNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - NetworkCommissioning::Commands::ScanNetworks::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (params != nil) { - if (params.ssid != nil) { - auto & definedValue_0 = request.ssid.Emplace(); - if (params.ssid == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.ssid]; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } + return err; } - if (params.breadcrumb != nil) { - auto & definedValue_0 = request.breadcrumb.Emplace(); - definedValue_0 = params.breadcrumb.unsignedLongLongValue; - } - } - - new CHIPNetworkCommissioningClusterScanNetworksResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxNetworksWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -30477,120 +29374,122 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNetworkCommissioningNetworksListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNetworksWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNetworkCommissioningNetworksListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -30600,18 +29499,18 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: @@ -30619,41 +29518,41 @@ - (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonn reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -30663,91 +29562,59 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); -} - -- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInterfaceEnabledWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -30757,129 +29624,123 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLastNetworkingStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable( - success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableOctetStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableOctetStringAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLastNetworkIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -30889,61 +29750,59 @@ new CHIPNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(C }); } -- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt32sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt32sAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLastConnectErrorValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -30953,187 +29812,185 @@ new CHIPNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActivePowerPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -31143,59 +30000,60 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -31205,246 +30063,123 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPOtaSoftwareUpdateProvider - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)applyUpdateRequestWithParams:(CHIPOtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params - completionHandler:(void (^)(CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.updateToken = [self asByteSpan:params.updateToken]; - request.newVersion = params.newVersion.unsignedIntValue; - - new CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)notifyUpdateAppliedWithParams:(CHIPOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.updateToken = [self asByteSpan:params.updateToken]; - request.softwareVersion = params.softwareVersion.unsignedIntValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)queryImageWithParams:(CHIPOtaSoftwareUpdateProviderClusterQueryImageParams *)params - completionHandler:(void (^)(CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.vendorId = static_cast>(params.vendorId.unsignedShortValue); - request.productId = params.productId.unsignedShortValue; - request.softwareVersion = params.softwareVersion.unsignedIntValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.protocolsSupported.count != 0) { - auto * listHolder_0 = new ListHolder(params.protocolsSupported.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.protocolsSupported.count; ++i_0) { - if (![params.protocolsSupported[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return; - } - auto element_0 = (NSNumber *) params.protocolsSupported[i_0]; - listHolder_0->mList[i_0] - = static_castmList[i_0])>>(element_0.unsignedCharValue); - } - request.protocolsSupported = ListType_0(listHolder_0->mList, params.protocolsSupported.count); - } else { - request.protocolsSupported = ListType_0(); - } - } - if (params.hardwareVersion != nil) { - auto & definedValue_0 = request.hardwareVersion.Emplace(); - definedValue_0 = params.hardwareVersion.unsignedShortValue; - } - if (params.location != nil) { - auto & definedValue_0 = request.location.Emplace(); - definedValue_0 = [self asCharSpan:params.location]; - } - if (params.requestorCanConsent != nil) { - auto & definedValue_0 = request.requestorCanConsent.Emplace(); - definedValue_0 = params.requestorCanConsent.boolValue; - } - if (params.metadataForProvider != nil) { - auto & definedValue_0 = request.metadataForProvider.Emplace(); - definedValue_0 = [self asByteSpan:params.metadataForProvider]; - } - - new CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -31454,224 +30189,122 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPOtaSoftwareUpdateRequestor - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)announceOtaProviderWithParams:(CHIPOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.providerNodeId = params.providerNodeId.unsignedLongLongValue; - request.vendorId = static_cast>(params.vendorId.unsignedShortValue); - request.announcementReason - = static_cast>(params.announcementReason.unsignedCharValue); - if (params.metadataForNode != nil) { - auto & definedValue_0 = request.metadataForNode.Emplace(); - definedValue_0 = [self asByteSpan:params.metadataForNode]; - } - request.endpoint = params.endpoint.unsignedShortValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeDefaultOtaProvidersWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); -} - -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[CHIPOtaSoftwareUpdateRequestorClusterProviderLocation class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (CHIPOtaSoftwareUpdateRequestorClusterProviderLocation *) value[i_0]; - listHolder_0->mList[i_0].providerNodeID = element_0.providerNodeID.unsignedLongLongValue; - listHolder_0->mList[i_0].endpoint = element_0.endpoint.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeUpdatePossibleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePowerFactorPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -31681,128 +30314,124 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeUpdateStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeUpdateStateProgressWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -31812,86 +30441,87 @@ new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -31900,7 +30530,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -31912,16 +30542,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -31937,66 +30567,60 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPOccupancySensing - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOccupancyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32006,60 +30630,60 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOccupancySensorTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32069,60 +30693,60 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32135,10 +30759,10 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOccupancySensingGeneratedCommandListListAttributeCallbackBridge( + new CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -32152,19 +30776,19 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -32177,17 +30801,17 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOccupancySensingGeneratedCommandListListAttributeCallbackBridge( + new CHIPElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32200,10 +30824,10 @@ new CHIPOccupancySensingGeneratedCommandListListAttributeCallbackBridge( - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOccupancySensingAcceptedCommandListListAttributeCallbackBridge( + new CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -32217,19 +30841,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -32242,17 +30866,17 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOccupancySensingAcceptedCommandListListAttributeCallbackBridge( + new CHIPElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32265,10 +30889,10 @@ new CHIPOccupancySensingAcceptedCommandListListAttributeCallbackBridge( - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOccupancySensingAttributeListListAttributeCallbackBridge( + new CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -32280,19 +30904,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -32305,17 +30929,17 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOccupancySensingAttributeListListAttributeCallbackBridge( + new CHIPElectricalMeasurementAttributeListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32325,11 +30949,71 @@ new CHIPOccupancySensingAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -32350,7 +31034,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -32371,7 +31055,7 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContai new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -32389,22 +31073,23 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s @end -@implementation CHIPOnOff +@implementation CHIPEthernetNetworkDiagnostics - (chip::Controller::ClusterBase *)getCluster { return &_cppCluster; } -- (void)offWithCompletionHandler:(StatusCompletion)completionHandler +- (void)resetCountsWithCompletionHandler:(StatusCompletion)completionHandler { - [self offWithParams:nil completionHandler:completionHandler]; + [self resetCountsWithParams:nil completionHandler:completionHandler]; } -- (void)offWithParams:(CHIPOnOffClusterOffParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +- (void)resetCountsWithParams:(CHIPEthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - OnOff::Commands::Off::Type request; + EthernetNetworkDiagnostics::Commands::ResetCounts::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); @@ -32424,197 +31109,123 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)offWithEffectWithParams:(CHIPOnOffClusterOffWithEffectParams *)params completionHandler:(StatusCompletion)completionHandler +- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OnOff::Commands::OffWithEffect::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.effectId = static_cast>(params.effectId.unsignedCharValue); - request.effectVariant - = static_cast>(params.effectVariant.unsignedCharValue); - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)onWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self onWithParams:nil completionHandler:completionHandler]; -} -- (void)onWithParams:(CHIPOnOffClusterOnParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OnOff::Commands::On::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + auto successFn + = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)onWithRecallGlobalSceneWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self onWithRecallGlobalSceneWithParams:nil completionHandler:completionHandler]; -} -- (void)onWithRecallGlobalSceneWithParams:(CHIPOnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OnOff::Commands::OnWithRecallGlobalScene::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + subscriptionEstablishedHandler); } -- (void)onWithTimedOffWithParams:(CHIPOnOffClusterOnWithTimedOffParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributePHYRateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OnOff::Commands::OnWithTimedOff::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.onOffControl - = static_cast>(params.onOffControl.unsignedCharValue); - request.onTime = params.onTime.unsignedShortValue; - request.offWaitTime = params.offWaitTime.unsignedShortValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + new CHIPNullableEthernetNetworkDiagnosticsClusterPHYRateTypeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; }); } -- (void)toggleWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self toggleWithParams:nil completionHandler:completionHandler]; -} -- (void)toggleWithParams:(CHIPOnOffClusterToggleParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OnOff::Commands::Toggle::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPNullableBooleanAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOnOffWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFullDuplexWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32624,59 +31235,59 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGlobalSceneControlWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketRxCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32686,88 +31297,119 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOnTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, + new CHIPInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePacketTxCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOnTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxErrCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32777,90 +31419,120 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + new CHIPInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + ++ (void)readAttributeCollisionCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOffWaitTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOverrunCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -32870,113 +31542,138 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( + new CHIPNullableBooleanAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + new CHIPNullableBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + ++ (void)readAttributeCarrierDetectWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + new CHIPNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); +- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( + new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeStartUpOnOffWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTimeSinceResetWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOnOffGeneratedCommandListListAttributeCallbackBridge( + new CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -32990,19 +31687,20 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33015,17 +31713,18 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOnOffGeneratedCommandListListAttributeCallbackBridge( + new CHIPEthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33038,10 +31737,10 @@ new CHIPOnOffGeneratedCommandListListAttributeCallbackBridge( - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOnOffAcceptedCommandListListAttributeCallbackBridge( + new CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -33055,19 +31754,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33080,17 +31779,18 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOnOffAcceptedCommandListListAttributeCallbackBridge( + new CHIPEthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33103,10 +31803,10 @@ new CHIPOnOffAcceptedCommandListListAttributeCallbackBridge( - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOnOffAttributeListListAttributeCallbackBridge( + new CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -33118,19 +31818,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOnOffAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -33143,30 +31843,31 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOnOffAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPEthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -33186,7 +31887,7 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -33206,7 +31907,7 @@ + (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer * new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -33226,7 +31927,7 @@ - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _ NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -33247,7 +31948,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -33268,7 +31969,7 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContai new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -33286,91 +31987,31 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s @end -@implementation CHIPOnOffSwitchConfiguration +@implementation CHIPFanControl - (chip::Controller::ClusterBase *)getCluster { return &_cppCluster; } -- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPFanControlClusterFanModeTypeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeSwitchTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -33386,9 +32027,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -33396,114 +32037,143 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFanControlClusterFanModeTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSwitchActionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFanModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPFanControlClusterFanModeTypeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPOnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( + new CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPOnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFanModeSequenceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( + new CHIPFanControlClusterFanModeSequenceTypeAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33513,188 +32183,213 @@ new CHIPOnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPOnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributePercentSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePercentSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePercentCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSpeedMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -33704,384 +32399,115 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPOperationalCredentials - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)addNOCWithParams:(CHIPOperationalCredentialsClusterAddNOCParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::AddNOC::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; - } - request.IPKValue = [self asByteSpan:params.ipkValue]; - request.caseAdminNode = params.caseAdminNode.unsignedLongLongValue; - request.adminVendorId = params.adminVendorId.unsignedShortValue; - - new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - -- (void)addTrustedRootCertificateWithParams:(CHIPOperationalCredentialsClusterAddTrustedRootCertificateParams *)params +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - request.rootCertificate = [self asByteSpan:params.rootCertificate]; - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)attestationRequestWithParams:(CHIPOperationalCredentialsClusterAttestationRequestParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::AttestationRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.attestationNonce = [self asByteSpan:params.attestationNonce]; - - new CHIPOperationalCredentialsClusterAttestationResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)CSRRequestWithParams:(CHIPOperationalCredentialsClusterCSRRequestParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::CSRRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.CSRNonce = [self asByteSpan:params.csrNonce]; - - new CHIPOperationalCredentialsClusterCSRResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)certificateChainRequestWithParams:(CHIPOperationalCredentialsClusterCertificateChainRequestParams *)params - completionHandler: - (void (^)(CHIPOperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::CertificateChainRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.certificateType = params.certificateType.unsignedCharValue; - - new CHIPOperationalCredentialsClusterCertificateChainResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)removeFabricWithParams:(CHIPOperationalCredentialsClusterRemoveFabricParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::RemoveFabric::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.fabricIndex = params.fabricIndex.unsignedCharValue; - - new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)removeTrustedRootCertificateWithParams:(CHIPOperationalCredentialsClusterRemoveTrustedRootCertificateParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::RemoveTrustedRootCertificate::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.trustedRootIdentifier = [self asByteSpan:params.trustedRootIdentifier]; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)updateFabricLabelWithParams:(CHIPOperationalCredentialsClusterUpdateFabricLabelParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateFabricLabel::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.label = [self asCharSpan:params.label]; - - new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)updateNOCWithParams:(CHIPOperationalCredentialsClusterUpdateNOCParams *)params - completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateNOC::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; - } - - new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeNOCsWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPOperationalCredentialsNOCsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); -} - -- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeNOCsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPOperationalCredentialsNOCsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFabricsWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPOperationalCredentialsFabricsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); - }); -} - -- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSpeedSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOperationalCredentialsFabricsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -34090,7 +32516,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -34102,16 +32528,16 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeSupportedFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSpeedCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -34127,24 +32553,22 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRockSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -34153,7 +32577,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -34165,16 +32589,16 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeCommissionedFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRockSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -34190,89 +32614,115 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRockSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRockSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWindSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -34281,7 +32731,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -34293,16 +32743,16 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentFabricIndexWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWindSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -34318,14 +32768,107 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeWindSettingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeWindSettingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPFanControlGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } @@ -34338,19 +32881,19 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34363,17 +32906,17 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( + new CHIPFanControlGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34386,10 +32929,10 @@ new CHIPOperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( + new CHIPFanControlAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -34403,19 +32946,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34428,17 +32971,17 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( + new CHIPFanControlAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34451,10 +32994,10 @@ new CHIPOperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOperationalCredentialsAttributeListListAttributeCallbackBridge( + new CHIPFanControlAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -34466,19 +33009,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPFanControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -34491,17 +33034,17 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOperationalCredentialsAttributeListListAttributeCallbackBridge( + new CHIPFanControlAttributeListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34511,59 +33054,57 @@ new CHIPOperationalCredentialsAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34573,65 +33114,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPPowerSource - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34641,56 +33176,67 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation CHIPFixedLabel + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + return &_cppCluster; } -- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLabelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPFixedLabelLabelListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPFixedLabelLabelListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOrderWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLabelListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPFixedLabelLabelListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34700,184 +33246,250 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPFixedLabelGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPFixedLabelGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPFixedLabelAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPFixedLabelAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPFixedLabelAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPFixedLabelAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPFixedLabelAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34887,59 +33499,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeWiredCurrentTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -34949,60 +33561,69 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation CHIPFlowMeasurement + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + return &_cppCluster; } -- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35012,60 +33633,60 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeWiredNominalVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35075,60 +33696,60 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35138,58 +33759,57 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeWiredPresentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35199,61 +33819,62 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPPowerSourceActiveWiredFaultsListAttributeCallbackBridge( + new CHIPFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( + new CHIPFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeActiveWiredFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceActiveWiredFaultsListAttributeCallbackBridge( + new CHIPFlowMeasurementGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35263,149 +33884,150 @@ new CHIPPowerSourceActiveWiredFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeBatteryVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeBatteryVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPFlowMeasurementAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatteryPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPFlowMeasurementAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeBatteryPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryPercentRemainingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPFlowMeasurementAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatteryTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatteryTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -35414,7 +34036,7 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -35426,16 +34048,15 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryTimeRemainingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -35451,59 +34072,59 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeBatteryChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatteryChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryChargeLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35513,60 +34134,179 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBatteryReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation CHIPGeneralCommissioning + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; - auto successFn = Callback::FromCancelable(success); + return &_cppCluster; +} + +- (void)armFailSafeWithParams:(CHIPGeneralCommissioningClusterArmFailSafeParams *)params + completionHandler:(void (^)(CHIPGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GeneralCommissioning::Commands::ArmFailSafe::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.expiryLengthSeconds = params.expiryLengthSeconds.unsignedShortValue; + request.breadcrumb = params.breadcrumb.unsignedLongLongValue; + + new CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)setRegulatoryConfigWithParams:(CHIPGeneralCommissioningClusterSetRegulatoryConfigParams *)params + completionHandler:(void (^)(CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GeneralCommissioning::Commands::SetRegulatoryConfig::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.newRegulatoryConfig + = static_cast>(params.newRegulatoryConfig.unsignedCharValue); + request.countryCode = [self asCharSpan:params.countryCode]; + request.breadcrumb = params.breadcrumb.unsignedLongLongValue; + + new CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)commissioningCompleteWithCompletionHandler: + (void (^)(CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self commissioningCompleteWithParams:nil completionHandler:completionHandler]; +} +- (void)commissioningCompleteWithParams:(CHIPGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params + completionHandler: + (void (^)(CHIPGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GeneralCommissioning::Commands::CommissioningComplete::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatteryReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryReplacementNeededWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBreadcrumbWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35576,187 +34316,195 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeBatteryReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBasicCommissioningInfoWithCompletionHandler: + (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeBatteryReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryReplaceabilityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatteryPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeBatteryPresentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryPresentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRegulatoryConfigWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeActiveBatteryFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackBridge( + new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveBatteryFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackSubscriptionBridge( + new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeActiveBatteryFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocationCapabilityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackBridge( + new CHIPGeneralCommissioningClusterRegulatoryLocationTypeAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35766,60 +34514,60 @@ new CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackBridge( }); } -- (void)readAttributeBatteryReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatteryReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryReplacementDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -35829,213 +34577,215 @@ new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable }); } -- (void)readAttributeBatteryCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeBatteryCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryCommonDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatteryANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeBatteryANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryANSIDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatteryIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPGeneralCommissioningAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeBatteryIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryIECDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPGeneralCommissioningAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeBatteryApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatteryApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -36044,7 +34794,7 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -36056,16 +34806,15 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryApprovedChemistryWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -36081,59 +34830,59 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeBatteryCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatteryCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36143,59 +34892,131 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeBatteryQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation CHIPGeneralDiagnostics + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + return &_cppCluster; +} + +- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeNetworkInterfacesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeRebootCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatteryQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryQuantityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRebootCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36205,59 +35026,56 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBatteryChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatteryChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryChargeStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUpTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36267,24 +35085,24 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeBatteryTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatteryTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -36293,7 +35111,7 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -36305,16 +35123,16 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryTimeToFullChargeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTotalOperationalHoursWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -36330,60 +35148,58 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeBatteryFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeBatteryFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryFunctionalWhileChargingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeBootReasonsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::BootReasons::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36393,125 +35209,191 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeBatteryChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeBatteryChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBatteryChargingCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeActiveBatteryChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPPowerSourceActiveBatteryChargeFaultsListAttributeCallbackBridge( + new CHIPGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeActiveBatteryChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPowerSourceActiveBatteryChargeFaultsListAttributeCallbackSubscriptionBridge( + new CHIPGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPowerSourceActiveBatteryChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeActiveBatteryChargeFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveRadioFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceActiveBatteryChargeFaultsListAttributeCallbackBridge( + new CHIPGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36524,10 +35406,10 @@ new CHIPPowerSourceActiveBatteryChargeFaultsListAttributeCallbackBridge( - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceGeneratedCommandListListAttributeCallbackBridge( + new CHIPGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -36541,19 +35423,19 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -36566,17 +35448,17 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceGeneratedCommandListListAttributeCallbackBridge( + new CHIPGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36589,10 +35471,10 @@ new CHIPPowerSourceGeneratedCommandListListAttributeCallbackBridge( - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceAcceptedCommandListListAttributeCallbackBridge( + new CHIPGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -36606,19 +35488,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -36631,17 +35513,17 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceAcceptedCommandListListAttributeCallbackBridge( + new CHIPGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36654,10 +35536,10 @@ new CHIPPowerSourceAcceptedCommandListListAttributeCallbackBridge( - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceAttributeListListAttributeCallbackBridge( + new CHIPGeneralDiagnosticsAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -36669,19 +35551,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -36694,17 +35576,17 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceAttributeListListAttributeCallbackBridge( + new CHIPGeneralDiagnosticsAttributeListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36718,7 +35600,7 @@ - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -36738,7 +35620,7 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -36758,7 +35640,7 @@ + (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer * new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -36778,7 +35660,7 @@ - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _ NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -36799,7 +35681,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -36820,7 +35702,7 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContai new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -36838,131 +35720,281 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s @end -@implementation CHIPPowerSourceConfiguration +@implementation CHIPGroupKeyManagement - (chip::Controller::ClusterBase *)getCluster { return &_cppCluster; } -- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)keySetWriteWithParams:(CHIPGroupKeyManagementClusterKeySetWriteParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge( + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GroupKeyManagement::Commands::KeySetWrite::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; + request.groupKeySet.groupKeySecurityPolicy + = static_cast>( + params.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); + if (params.groupKeySet.epochKey0 == nil) { + request.groupKeySet.epochKey0.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochKey0.SetNonNull(); + nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey0]; + } + if (params.groupKeySet.epochStartTime0 == nil) { + request.groupKeySet.epochStartTime0.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochStartTime0.SetNonNull(); + nonNullValue_1 = params.groupKeySet.epochStartTime0.unsignedLongLongValue; + } + if (params.groupKeySet.epochKey1 == nil) { + request.groupKeySet.epochKey1.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochKey1.SetNonNull(); + nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey1]; + } + if (params.groupKeySet.epochStartTime1 == nil) { + request.groupKeySet.epochStartTime1.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochStartTime1.SetNonNull(); + nonNullValue_1 = params.groupKeySet.epochStartTime1.unsignedLongLongValue; + } + if (params.groupKeySet.epochKey2 == nil) { + request.groupKeySet.epochKey2.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochKey2.SetNonNull(); + nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey2]; + } + if (params.groupKeySet.epochStartTime2 == nil) { + request.groupKeySet.epochStartTime2.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochStartTime2.SetNonNull(); + nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)keySetReadWithParams:(CHIPGroupKeyManagementClusterKeySetReadParams *)params + completionHandler:(void (^)(CHIPGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GroupKeyManagement::Commands::KeySetRead::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupKeySetID = params.groupKeySetID.unsignedShortValue; + + new CHIPGroupKeyManagementClusterKeySetReadResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)keySetRemoveWithParams:(CHIPGroupKeyManagementClusterKeySetRemoveParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GroupKeyManagement::Commands::KeySetRemove::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupKeySetID = params.groupKeySetID.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeSourcesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)keySetReadAllIndicesWithParams:(CHIPGroupKeyManagementClusterKeySetReadAllIndicesParams *)params + completionHandler:(void (^)(CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.groupKeySetIDs.count != 0) { + auto * listHolder_0 = new ListHolder(params.groupKeySetIDs.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.groupKeySetIDs.count; ++i_0) { + if (![params.groupKeySetIDs[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; } - return err; + auto element_0 = (NSNumber *) params.groupKeySetIDs[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; } - return CHIP_ERROR_NOT_FOUND; + request.groupKeySetIDs = ListType_0(listHolder_0->mList, params.groupKeySetIDs.count); + } else { + request.groupKeySetIDs = ListType_0(); + } + } + + new CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGroupKeyMapWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( + new CHIPGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPGroupKeyManagementClusterGroupKeyMapStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (CHIPGroupKeyManagementClusterGroupKeyMapStruct *) value[i_0]; + listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; + listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGroupKeyMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( + new CHIPGroupKeyManagementGroupKeyMapListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36972,63 +36004,60 @@ new CHIPPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGroupTableWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( + new CHIPGroupKeyManagementGroupTableListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGroupTableWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( + new CHIPGroupKeyManagementGroupTableListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37038,86 +36067,86 @@ new CHIPPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPPowerSourceConfigurationAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPowerSourceConfigurationAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -37126,7 +36155,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -37138,16 +36167,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37163,255 +36192,250 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPPressureMeasurement - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( + new CHIPGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( + new CHIPGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( + new CHIPGroupKeyManagementAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPGroupKeyManagementAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37421,59 +36445,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37483,185 +36507,237 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation CHIPGroups + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPNullableInt16sAttributeCallbackBridge( + return &_cppCluster; +} + +- (void)addGroupWithParams:(CHIPGroupsClusterAddGroupParams *)params + completionHandler: + (void (^)(CHIPGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Groups::Commands::AddGroup::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + request.groupName = [self asCharSpan:params.groupName]; + + new CHIPGroupsClusterAddGroupResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)viewGroupWithParams:(CHIPGroupsClusterViewGroupParams *)params + completionHandler: + (void (^)(CHIPGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Groups::Commands::ViewGroup::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + + new CHIPGroupsClusterViewGroupResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeMinScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)getGroupMembershipWithParams:(CHIPGroupsClusterGetGroupMembershipParams *)params + completionHandler:(void (^)(CHIPGroupsClusterGetGroupMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Groups::Commands::GetGroupMembership::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.groupList.count != 0) { + auto * listHolder_0 = new ListHolder(params.groupList.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; } - return err; + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.groupList.count; ++i_0) { + if (![params.groupList[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (NSNumber *) params.groupList[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; + } + request.groupList = ListType_0(listHolder_0->mList, params.groupList.count); + } else { + request.groupList = ListType_0(); } - return CHIP_ERROR_NOT_FOUND; - }); + } + + new CHIPGroupsClusterGetGroupMembershipResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)removeGroupWithParams:(CHIPGroupsClusterRemoveGroupParams *)params + completionHandler: + (void (^)(CHIPGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Groups::Commands::RemoveGroup::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + + new CHIPGroupsClusterRemoveGroupResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)removeAllGroupsWithCompletionHandler:(StatusCompletion)completionHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + [self removeAllGroupsWithParams:nil completionHandler:completionHandler]; +} +- (void)removeAllGroupsWithParams:(CHIPGroupsClusterRemoveAllGroupsParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Groups::Commands::RemoveAllGroups::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeMaxScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)addGroupIfIdentifyingWithParams:(CHIPGroupsClusterAddGroupIfIdentifyingParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Groups::Commands::AddGroupIfIdentifying::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); + } + request.groupId = params.groupId.unsignedShortValue; + request.groupName = [self asCharSpan:params.groupName]; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeScaledToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNameSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + using TypeInfo = Groups::Attributes::NameSupport::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37671,119 +36747,127 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPGroupsGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8sAttributeCallbackSubscriptionBridge( + new CHIPGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGroupsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeScaleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPGroupsGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Groups::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPPressureMeasurementAttributeListListAttributeCallbackBridge( + new CHIPGroupsAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPressureMeasurementAttributeListListAttributeCallbackBridge( + new CHIPGroupsAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = Groups::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37793,59 +36877,59 @@ new CHIPPressureMeasurementAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPGroupsAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPGroupsAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPGroupsAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Groups::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37855,68 +36939,57 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPPumpConfigurationAndControl - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + using TypeInfo = Groups::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37926,58 +36999,59 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + using TypeInfo = Groups::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -37987,57 +37061,180 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation CHIPIdentify + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPNullableInt16uAttributeCallbackBridge( + return &_cppCluster; +} + +- (void)identifyWithParams:(CHIPIdentifyClusterIdentifyParams *)params completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Identify::Commands::Identify::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.identifyTime = params.identifyTime.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)identifyQueryWithCompletionHandler:(void (^)(CHIPIdentifyClusterIdentifyQueryResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self identifyQueryWithParams:nil completionHandler:completionHandler]; +} +- (void)identifyQueryWithParams:(CHIPIdentifyClusterIdentifyQueryParams * _Nullable)params + completionHandler:(void (^)(CHIPIdentifyClusterIdentifyQueryResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Identify::Commands::IdentifyQuery::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPIdentifyClusterIdentifyQueryResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)triggerEffectWithParams:(CHIPIdentifyClusterTriggerEffectParams *)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Identify::Commands::TriggerEffect::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.effectIdentifier + = static_cast>(params.effectIdentifier.unsignedCharValue); + request.effectVariant + = static_cast>(params.effectVariant.unsignedCharValue); + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeIdentifyTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + using TypeInfo = Identify::Attributes::IdentifyTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38047,60 +37244,58 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinConstPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeIdentifyTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + using TypeInfo = Identify::Attributes::IdentifyType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38110,186 +37305,250 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( + new CHIPIdentifyGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPIdentifyGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxConstPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPIdentifyGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Identify::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( + new CHIPIdentifyAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinCompPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPIdentifyAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Identify::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( + new CHIPIdentifyAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPIdentifyAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPIdentifyAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxCompPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPIdentifyAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Identify::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + using TypeInfo = Identify::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38299,60 +37558,59 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinConstSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + using TypeInfo = Identify::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38362,19 +37620,28 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)( +@end + +@implementation CHIPIlluminanceMeasurement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -38388,7 +37655,7 @@ new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -38400,7 +37667,7 @@ new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeMaxConstSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: @@ -38409,7 +37676,7 @@ + (void)readAttributeMaxConstSpeedWithAttributeCache:(CHIPAttributeCacheContaine new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38425,23 +37692,24 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -38450,7 +37718,7 @@ new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -38462,16 +37730,16 @@ new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeMinConstFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38487,23 +37755,24 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -38512,7 +37781,7 @@ new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -38524,16 +37793,16 @@ new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeMaxConstFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38549,59 +37818,57 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinConstTempWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38611,59 +37878,60 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxConstTempWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLightSensorTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38673,126 +37941,127 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePumpStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + new CHIPIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( + new CHIPIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + CHIPIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEffectiveOperationModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + new CHIPIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38802,63 +38071,60 @@ new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBrid }); } -- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + new CHIPIlluminanceMeasurementAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( + new CHIPIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEffectiveControlModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + new CHIPIlluminanceMeasurementAttributeListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38868,58 +38134,57 @@ new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge }); } -- (void)readAttributeCapacityWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38929,57 +38194,59 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -38989,263 +38256,282 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt32uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +@implementation CHIPKeypadInput + +- (chip::Controller::ClusterBase *)getCluster { - [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + return &_cppCluster; } -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)sendKeyWithParams:(CHIPKeypadInputClusterSendKeyParams *)params + completionHandler: + (void (^)(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + KeypadInput::Commands::SendKey::Type request; if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.keyCode = static_cast>(params.keyCode.unsignedCharValue); - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - auto successFn = Callback::FromCancelable(success); + new CHIPKeypadInputClusterSendKeyResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPKeypadInputGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + new CHIPKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPKeypadInputGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge( + new CHIPKeypadInputAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + new CHIPKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPKeypadInputAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge( + new CHIPKeypadInputAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; -} -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, + new CHIPKeypadInputAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - auto successFn = Callback::FromCancelable(success); + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPKeypadInputAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; }); } -- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39255,218 +38541,378 @@ new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeOperationModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOperationModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeControlModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation CHIPLevelControl + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + return &_cppCluster; +} + +- (void)moveToLevelWithParams:(CHIPLevelControlClusterMoveToLevelParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + LevelControl::Commands::MoveToLevel::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.level = params.level.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionMask = params.optionMask.unsignedCharValue; + request.optionOverride = params.optionOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)moveWithParams:(CHIPLevelControlClusterMoveParams *)params completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + LevelControl::Commands::Move::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedCharValue; + request.optionMask = params.optionMask.unsignedCharValue; + request.optionOverride = params.optionOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)stepWithParams:(CHIPLevelControlClusterStepParams *)params completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedWriteTimeoutMs; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + LevelControl::Commands::Step::Type request; if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.stepMode = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.optionMask = params.optionMask.unsignedCharValue; + request.optionOverride = params.optionOverride.unsignedCharValue; - new CHIPDefaultSuccessCallbackBridge( + new CHIPCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { + ^(id _Nullable value, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)stopWithParams:(CHIPLevelControlClusterStopParams *)params completionHandler:(StatusCompletion)completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + LevelControl::Commands::Stop::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.optionMask = params.optionMask.unsignedCharValue; + request.optionOverride = params.optionOverride.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)moveToLevelWithOnOffWithParams:(CHIPLevelControlClusterMoveToLevelWithOnOffParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + LevelControl::Commands::MoveToLevelWithOnOff::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.level = params.level.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)moveWithOnOffWithParams:(CHIPLevelControlClusterMoveWithOnOffParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + LevelControl::Commands::MoveWithOnOff::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.moveMode = static_cast>(params.moveMode.unsignedCharValue); + request.rate = params.rate.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)stepWithOnOffWithParams:(CHIPLevelControlClusterStepWithOnOffParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + LevelControl::Commands::StepWithOnOff::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.stepMode = static_cast>(params.stepMode.unsignedCharValue); + request.stepSize = params.stepSize.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)stopWithOnOffWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self stopWithOnOffWithParams:nil completionHandler:completionHandler]; +} +- (void)stopWithOnOffWithParams:(CHIPLevelControlClusterStopWithOnOffParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + LevelControl::Commands::StopWithOnOff::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeControlModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::AlarmMask::TypeInfo; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAlarmMaskWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -39475,7 +38921,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::AlarmMask::TypeInfo; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -39487,15 +38933,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeAlarmMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRemainingTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::AlarmMask::TypeInfo; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -39511,256 +38958,240 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39770,23 +39201,22 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -39795,7 +39225,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -39807,16 +39237,16 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -39832,69 +39262,88 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPRelativeHumidityMeasurement - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOptionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39904,60 +39353,92 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOnOffTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -39967,60 +39448,94 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOnLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40030,57 +39545,97 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOnTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40090,66 +39645,363 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - new CHIPRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; - auto successFn - = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge( + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeOffTransitionTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeDefaultMoveRateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeStartUpCurrentLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPLevelControlGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPLevelControlGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40162,10 +40014,10 @@ new CHIPRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBrid - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge( + new CHIPLevelControlAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -40179,20 +40031,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge:: - OnSubscriptionEstablished, + CHIPLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -40205,18 +40056,17 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge( + new CHIPLevelControlAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn - = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40229,10 +40079,10 @@ new CHIPRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridg - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( + new CHIPLevelControlAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -40244,19 +40094,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPLevelControlAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -40269,17 +40119,17 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( + new CHIPLevelControlAttributeListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40289,11 +40139,71 @@ new CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -40314,7 +40224,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -40335,7 +40245,7 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContai new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -40353,381 +40263,97 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s @end -@implementation CHIPScenes +@implementation CHIPLocalizationConfiguration - (chip::Controller::ClusterBase *)getCluster { return &_cppCluster; } -- (void)addSceneWithParams:(CHIPScenesClusterAddSceneParams *)params - completionHandler: - (void (^)(CHIPScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Scenes::Commands::AddScene::Type request; + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - request.sceneName = [self asCharSpan:params.sceneName]; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.extensionFieldSets.count != 0) { - auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.extensionFieldSets.count; ++i_0) { - if (![params.extensionFieldSets[i_0] isKindOfClass:[CHIPScenesClusterSceneExtensionFieldSet class]]) { - // Wrong kind of value. - return; - } - auto element_0 = (CHIPScenesClusterSceneExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterId = element_0.clusterId.unsignedIntValue; - listHolder_0->mList[i_0].length = element_0.length.unsignedCharValue; - listHolder_0->mList[i_0].value = element_0.value.unsignedCharValue; - } - request.extensionFieldSets = ListType_0(listHolder_0->mList, params.extensionFieldSets.count); - } else { - request.extensionFieldSets = ListType_0(); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - new CHIPScenesClusterAddSceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)getSceneMembershipWithParams:(CHIPScenesClusterGetSceneMembershipParams *)params - completionHandler:(void (^)(CHIPScenesClusterGetSceneMembershipResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Scenes::Commands::GetSceneMembership::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - - new CHIPScenesClusterGetSceneMembershipResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)recallSceneWithParams:(CHIPScenesClusterRecallSceneParams *)params completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Scenes::Commands::RecallScene::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; - request.transitionTime = params.transitionTime.unsignedShortValue; - - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)removeAllScenesWithParams:(CHIPScenesClusterRemoveAllScenesParams *)params - completionHandler:(void (^)(CHIPScenesClusterRemoveAllScenesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Scenes::Commands::RemoveAllScenes::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - - new CHIPScenesClusterRemoveAllScenesResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)removeSceneWithParams:(CHIPScenesClusterRemoveSceneParams *)params - completionHandler: - (void (^)(CHIPScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Scenes::Commands::RemoveScene::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; - - new CHIPScenesClusterRemoveSceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)storeSceneWithParams:(CHIPScenesClusterStoreSceneParams *)params - completionHandler: - (void (^)(CHIPScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Scenes::Commands::StoreScene::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; - - new CHIPScenesClusterStoreSceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)viewSceneWithParams:(CHIPScenesClusterViewSceneParams *)params - completionHandler: - (void (^)(CHIPScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Scenes::Commands::ViewScene::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; - - new CHIPScenesClusterViewSceneResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)readAttributeSceneCountWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeSceneCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeCurrentSceneWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentGroupWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeActiveLocaleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40737,134 +40363,77 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeSceneValidWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeSceneValidWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNameSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedLocalesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPScenesGeneratedCommandListListAttributeCallbackBridge( + new CHIPLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -40878,19 +40447,19 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -40903,17 +40472,18 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPScenesGeneratedCommandListListAttributeCallbackBridge( + new CHIPLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40926,10 +40496,10 @@ new CHIPScenesGeneratedCommandListListAttributeCallbackBridge( - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPScenesAcceptedCommandListListAttributeCallbackBridge( + new CHIPLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -40943,19 +40513,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -40968,17 +40538,18 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPScenesAcceptedCommandListListAttributeCallbackBridge( + new CHIPLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn + = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40991,10 +40562,10 @@ new CHIPScenesAcceptedCommandListListAttributeCallbackBridge( - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPScenesAttributeListListAttributeCallbackBridge( + new CHIPLocalizationConfigurationAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -41006,19 +40577,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPScenesAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -41031,78 +40602,77 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPScenesAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPLocalizationConfigurationAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -41112,160 +40682,59 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPSoftwareDiagnostics - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)resetWatermarksWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self resetWatermarksWithParams:nil completionHandler:completionHandler]; -} -- (void)resetWatermarksWithParams:(CHIPSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - SoftwareDiagnostics::Commands::ResetWatermarks::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeThreadMetricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentHeapFreeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -41275,138 +40744,50 @@ new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} +@end -- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} +@implementation CHIPLowPower -+ (void)readAttributeCurrentHeapUsedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (chip::Controller::ClusterBase *)getCluster { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return &_cppCluster; } -- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)sleepWithCompletionHandler:(StatusCompletion)completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + [self sleepWithParams:nil completionHandler:completionHandler]; } - -- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)sleepWithParams:(CHIPLowPowerClusterSleepParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + LowPower::Commands::Sleep::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( + new CHIPLowPowerGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -41420,19 +40801,19 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -41445,17 +40826,17 @@ + (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheC completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( + new CHIPLowPowerGeneratedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -41468,10 +40849,10 @@ new CHIPSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( - (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + new CHIPLowPowerAcceptedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -41485,19 +40866,19 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -41510,17 +40891,17 @@ + (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheCo completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + new CHIPLowPowerAcceptedCommandListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -41533,10 +40914,10 @@ new CHIPSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( + new CHIPLowPowerAttributeListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -41548,19 +40929,19 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPLowPowerAttributeListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -41573,17 +40954,17 @@ + (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContaine completionHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( + new CHIPLowPowerAttributeListListAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -41597,7 +40978,7 @@ - (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -41617,7 +40998,7 @@ new CHIPInt32uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -41637,7 +41018,7 @@ + (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer * new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -41657,7 +41038,7 @@ - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _ NSError * _Nullable error))completionHandler { new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); @@ -41678,7 +41059,7 @@ new CHIPInt16uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -41699,7 +41080,7 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContai new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -41715,192 +41096,18849 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPSwitch - -- (chip::Controller::ClusterBase *)getCluster +@end + +@implementation CHIPMediaInput + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)selectInputWithParams:(CHIPMediaInputClusterSelectInputParams *)params completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaInput::Commands::SelectInput::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.index = params.index.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)showInputStatusWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self showInputStatusWithParams:nil completionHandler:completionHandler]; +} +- (void)showInputStatusWithParams:(CHIPMediaInputClusterShowInputStatusParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaInput::Commands::ShowInputStatus::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)hideInputStatusWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self hideInputStatusWithParams:nil completionHandler:completionHandler]; +} +- (void)hideInputStatusWithParams:(CHIPMediaInputClusterHideInputStatusParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaInput::Commands::HideInputStatus::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)renameInputWithParams:(CHIPMediaInputClusterRenameInputParams *)params completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaInput::Commands::RenameInput::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.index = params.index.unsignedCharValue; + request.name = [self asCharSpan:params.name]; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeInputListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaInputInputListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPMediaInputInputListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeInputListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaInputInputListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentInputWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPMediaInputGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaInputGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPMediaInputAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaInputAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaInputAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPMediaInputAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaInputAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPMediaPlayback + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)playWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self playWithParams:nil completionHandler:completionHandler]; +} +- (void)playWithParams:(CHIPMediaPlaybackClusterPlayParams * _Nullable)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Play::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)pauseWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self pauseWithParams:nil completionHandler:completionHandler]; +} +- (void)pauseWithParams:(CHIPMediaPlaybackClusterPauseParams * _Nullable)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Pause::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)stopPlaybackWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self stopPlaybackWithParams:nil completionHandler:completionHandler]; +} +- (void)stopPlaybackWithParams:(CHIPMediaPlaybackClusterStopPlaybackParams * _Nullable)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::StopPlayback::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)startOverWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self startOverWithParams:nil completionHandler:completionHandler]; +} +- (void)startOverWithParams:(CHIPMediaPlaybackClusterStartOverParams * _Nullable)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::StartOver::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)previousWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self previousWithParams:nil completionHandler:completionHandler]; +} +- (void)previousWithParams:(CHIPMediaPlaybackClusterPreviousParams * _Nullable)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Previous::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)nextWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self nextWithParams:nil completionHandler:completionHandler]; +} +- (void)nextWithParams:(CHIPMediaPlaybackClusterNextParams * _Nullable)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Next::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)rewindWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self rewindWithParams:nil completionHandler:completionHandler]; +} +- (void)rewindWithParams:(CHIPMediaPlaybackClusterRewindParams * _Nullable)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Rewind::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)fastForwardWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self fastForwardWithParams:nil completionHandler:completionHandler]; +} +- (void)fastForwardWithParams:(CHIPMediaPlaybackClusterFastForwardParams * _Nullable)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::FastForward::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)skipForwardWithParams:(CHIPMediaPlaybackClusterSkipForwardParams *)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::SkipForward::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)skipBackwardWithParams:(CHIPMediaPlaybackClusterSkipBackwardParams *)params + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::SkipBackward::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.deltaPositionMilliseconds = params.deltaPositionMilliseconds.unsignedLongLongValue; + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)seekWithParams:(CHIPMediaPlaybackClusterSeekParams *)params + completionHandler: + (void (^)(CHIPMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + MediaPlayback::Commands::Seek::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.position = params.position.unsignedLongLongValue; + + new CHIPMediaPlaybackClusterPlaybackResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPMediaPlaybackClusterPlaybackStateEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackClusterPlaybackStateEnumAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeStartTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt64uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeStartTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDurationWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt64uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeDurationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackSampledPositionStructAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSampledPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(CHIPMediaPlaybackClusterPlaybackPosition * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackSampledPositionStructAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPFloatAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePlaybackSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt64uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSeekRangeEndWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt64uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSeekRangeStartWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPMediaPlaybackAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPModeSelect + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)changeToModeWithParams:(CHIPModeSelectClusterChangeToModeParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + ModeSelect::Commands::ChangeToMode::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.newMode = params.newMode.unsignedCharValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeStandardNamespaceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPModeSelectSupportedModesListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPModeSelectSupportedModesListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSupportedModesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPModeSelectSupportedModesListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeStartUpModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeOnModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPModeSelectGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPModeSelectGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPModeSelectAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPModeSelectAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPModeSelectAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPModeSelectAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPModeSelectAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPNetworkCommissioning + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)scanNetworksWithParams:(CHIPNetworkCommissioningClusterScanNetworksParams * _Nullable)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::ScanNetworks::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (params != nil) { + if (params.ssid != nil) { + auto & definedValue_0 = request.ssid.Emplace(); + if (params.ssid == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = [self asByteSpan:params.ssid]; + } + } + if (params.breadcrumb != nil) { + auto & definedValue_0 = request.breadcrumb.Emplace(); + definedValue_0 = params.breadcrumb.unsignedLongLongValue; + } + } + + new CHIPNetworkCommissioningClusterScanNetworksResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)addOrUpdateWiFiNetworkWithParams:(CHIPNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.ssid = [self asByteSpan:params.ssid]; + request.credentials = [self asByteSpan:params.credentials]; + if (params.breadcrumb != nil) { + auto & definedValue_0 = request.breadcrumb.Emplace(); + definedValue_0 = params.breadcrumb.unsignedLongLongValue; + } + + new CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)addOrUpdateThreadNetworkWithParams:(CHIPNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.operationalDataset = [self asByteSpan:params.operationalDataset]; + if (params.breadcrumb != nil) { + auto & definedValue_0 = request.breadcrumb.Emplace(); + definedValue_0 = params.breadcrumb.unsignedLongLongValue; + } + + new CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)removeNetworkWithParams:(CHIPNetworkCommissioningClusterRemoveNetworkParams *)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::RemoveNetwork::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.networkID = [self asByteSpan:params.networkID]; + if (params.breadcrumb != nil) { + auto & definedValue_0 = request.breadcrumb.Emplace(); + definedValue_0 = params.breadcrumb.unsignedLongLongValue; + } + + new CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)connectNetworkWithParams:(CHIPNetworkCommissioningClusterConnectNetworkParams *)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::ConnectNetwork::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.networkID = [self asByteSpan:params.networkID]; + if (params.breadcrumb != nil) { + auto & definedValue_0 = request.breadcrumb.Emplace(); + definedValue_0 = params.breadcrumb.unsignedLongLongValue; + } + + new CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)reorderNetworkWithParams:(CHIPNetworkCommissioningClusterReorderNetworkParams *)params + completionHandler:(void (^)(CHIPNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + NetworkCommissioning::Commands::ReorderNetwork::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.networkID = [self asByteSpan:params.networkID]; + request.networkIndex = params.networkIndex.unsignedCharValue; + if (params.breadcrumb != nil) { + auto & definedValue_0 = request.breadcrumb.Emplace(); + definedValue_0 = params.breadcrumb.unsignedLongLongValue; + } + + new CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxNetworksWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNetworkCommissioningNetworksListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeNetworksWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNetworkCommissioningNetworksListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeInterfaceEnabledWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeLastNetworkingStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableNetworkCommissioningClusterNetworkCommissioningStatusAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable( + success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableOctetStringAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableOctetStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeLastNetworkIDWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt32sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt32sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeLastConnectErrorValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNetworkCommissioningAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPOtaSoftwareUpdateProvider + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)queryImageWithParams:(CHIPOtaSoftwareUpdateProviderClusterQueryImageParams *)params + completionHandler:(void (^)(CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OtaSoftwareUpdateProvider::Commands::QueryImage::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.vendorId = static_cast>(params.vendorId.unsignedShortValue); + request.productId = params.productId.unsignedShortValue; + request.softwareVersion = params.softwareVersion.unsignedIntValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.protocolsSupported.count != 0) { + auto * listHolder_0 = new ListHolder(params.protocolsSupported.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.protocolsSupported.count; ++i_0) { + if (![params.protocolsSupported[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (NSNumber *) params.protocolsSupported[i_0]; + listHolder_0->mList[i_0] + = static_castmList[i_0])>>(element_0.unsignedCharValue); + } + request.protocolsSupported = ListType_0(listHolder_0->mList, params.protocolsSupported.count); + } else { + request.protocolsSupported = ListType_0(); + } + } + if (params.hardwareVersion != nil) { + auto & definedValue_0 = request.hardwareVersion.Emplace(); + definedValue_0 = params.hardwareVersion.unsignedShortValue; + } + if (params.location != nil) { + auto & definedValue_0 = request.location.Emplace(); + definedValue_0 = [self asCharSpan:params.location]; + } + if (params.requestorCanConsent != nil) { + auto & definedValue_0 = request.requestorCanConsent.Emplace(); + definedValue_0 = params.requestorCanConsent.boolValue; + } + if (params.metadataForProvider != nil) { + auto & definedValue_0 = request.metadataForProvider.Emplace(); + definedValue_0 = [self asByteSpan:params.metadataForProvider]; + } + + new CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)applyUpdateRequestWithParams:(CHIPOtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params + completionHandler:(void (^)(CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.updateToken = [self asByteSpan:params.updateToken]; + request.newVersion = params.newVersion.unsignedIntValue; + + new CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)notifyUpdateAppliedWithParams:(CHIPOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.updateToken = [self asByteSpan:params.updateToken]; + request.softwareVersion = params.softwareVersion.unsignedIntValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateProviderAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPOtaSoftwareUpdateRequestor + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)announceOtaProviderWithParams:(CHIPOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.providerNodeId = params.providerNodeId.unsignedLongLongValue; + request.vendorId = static_cast>(params.vendorId.unsignedShortValue); + request.announcementReason + = static_cast>(params.announcementReason.unsignedCharValue); + if (params.metadataForNode != nil) { + auto & definedValue_0 = request.metadataForNode.Emplace(); + definedValue_0 = [self asByteSpan:params.metadataForNode]; + } + request.endpoint = params.endpoint.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeDefaultOtaProvidersWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + }); +} + +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPOtaSoftwareUpdateRequestorClusterProviderLocation class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (CHIPOtaSoftwareUpdateRequestorClusterProviderLocation *) value[i_0]; + listHolder_0->mList[i_0].providerNodeID = element_0.providerNodeID.unsignedLongLongValue; + listHolder_0->mList[i_0].endpoint = element_0.endpoint.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProviders::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeUpdatePossibleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeUpdateStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorClusterOTAUpdateStateEnumAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeUpdateStateProgressWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOtaSoftwareUpdateRequestorAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPOccupancySensing + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeOccupancyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeOccupancySensorTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PirOccupiedToUnoccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache: + (CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOccupancySensingGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOccupancySensingGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOccupancySensingAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOccupancySensingAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOccupancySensingAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOccupancySensingAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOccupancySensingAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPOnOff + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)offWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self offWithParams:nil completionHandler:completionHandler]; +} +- (void)offWithParams:(CHIPOnOffClusterOffParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OnOff::Commands::Off::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)onWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self onWithParams:nil completionHandler:completionHandler]; +} +- (void)onWithParams:(CHIPOnOffClusterOnParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OnOff::Commands::On::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)toggleWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self toggleWithParams:nil completionHandler:completionHandler]; +} +- (void)toggleWithParams:(CHIPOnOffClusterToggleParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OnOff::Commands::Toggle::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)offWithEffectWithParams:(CHIPOnOffClusterOffWithEffectParams *)params completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OnOff::Commands::OffWithEffect::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.effectId = static_cast>(params.effectId.unsignedCharValue); + request.effectVariant + = static_cast>(params.effectVariant.unsignedCharValue); + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)onWithRecallGlobalSceneWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self onWithRecallGlobalSceneWithParams:nil completionHandler:completionHandler]; +} +- (void)onWithRecallGlobalSceneWithParams:(CHIPOnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OnOff::Commands::OnWithRecallGlobalScene::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)onWithTimedOffWithParams:(CHIPOnOffClusterOnWithTimedOffParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OnOff::Commands::OnWithTimedOff::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.onOffControl + = static_cast>(params.onOffControl.unsignedCharValue); + request.onTime = params.onTime.unsignedShortValue; + request.offWaitTime = params.offWaitTime.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeOnOffWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGlobalSceneControlWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeOnTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeOnTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeOffWaitTimeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeStartUpOnOffWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableOnOffClusterOnOffStartUpOnOffAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOnOffGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOnOffGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOnOffAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOnOffAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOnOffAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOnOffAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOnOffAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPOnOffSwitchConfiguration + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSwitchTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSwitchActionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPOperationalCredentials + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)attestationRequestWithParams:(CHIPOperationalCredentialsClusterAttestationRequestParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::AttestationRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.attestationNonce = [self asByteSpan:params.attestationNonce]; + + new CHIPOperationalCredentialsClusterAttestationResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)certificateChainRequestWithParams:(CHIPOperationalCredentialsClusterCertificateChainRequestParams *)params + completionHandler: + (void (^)(CHIPOperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::CertificateChainRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.certificateType = params.certificateType.unsignedCharValue; + + new CHIPOperationalCredentialsClusterCertificateChainResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)CSRRequestWithParams:(CHIPOperationalCredentialsClusterCSRRequestParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::CSRRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.CSRNonce = [self asByteSpan:params.csrNonce]; + + new CHIPOperationalCredentialsClusterCSRResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)addNOCWithParams:(CHIPOperationalCredentialsClusterAddNOCParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::AddNOC::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.NOCValue = [self asByteSpan:params.nocValue]; + if (params.icacValue != nil) { + auto & definedValue_0 = request.ICACValue.Emplace(); + definedValue_0 = [self asByteSpan:params.icacValue]; + } + request.IPKValue = [self asByteSpan:params.ipkValue]; + request.caseAdminNode = params.caseAdminNode.unsignedLongLongValue; + request.adminVendorId = params.adminVendorId.unsignedShortValue; + + new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)updateNOCWithParams:(CHIPOperationalCredentialsClusterUpdateNOCParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::UpdateNOC::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.NOCValue = [self asByteSpan:params.nocValue]; + if (params.icacValue != nil) { + auto & definedValue_0 = request.ICACValue.Emplace(); + definedValue_0 = [self asByteSpan:params.icacValue]; + } + + new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)updateFabricLabelWithParams:(CHIPOperationalCredentialsClusterUpdateFabricLabelParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::UpdateFabricLabel::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.label = [self asCharSpan:params.label]; + + new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)removeFabricWithParams:(CHIPOperationalCredentialsClusterRemoveFabricParams *)params + completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::RemoveFabric::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.fabricIndex = params.fabricIndex.unsignedCharValue; + + new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)addTrustedRootCertificateWithParams:(CHIPOperationalCredentialsClusterAddTrustedRootCertificateParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.rootCertificate = [self asByteSpan:params.rootCertificate]; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)removeTrustedRootCertificateWithParams:(CHIPOperationalCredentialsClusterRemoveTrustedRootCertificateParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + OperationalCredentials::Commands::RemoveTrustedRootCertificate::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.trustedRootIdentifier = [self asByteSpan:params.trustedRootIdentifier]; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeNOCsWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsNOCsListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + }); +} + +- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeNOCsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsNOCsListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFabricsWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsFabricsListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + }); +} + +- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsFabricsListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSupportedFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCommissionedFabricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPOperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPOperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPPowerSource + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeOrderWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeWiredCurrentTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeWiredNominalVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeWiredPresentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceActiveWiredFaultsListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeActiveWiredFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceActiveWiredFaultsListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryVoltageWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryVoltage::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryPercentRemainingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryPercentRemaining::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryTimeRemainingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryTimeRemaining::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryChargeLevelWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryChargeLevel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryReplacementNeededWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryReplacementNeeded::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryReplaceabilityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryReplaceability::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryPresentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryPresentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryPresent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActiveBatteryFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeActiveBatteryFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeActiveBatteryFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceActiveBatteryFaultsListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::ActiveBatteryFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryReplacementDescriptionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryReplacementDescription::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryCommonDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryCommonDesignation::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryANSIDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryANSIDesignation::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPCharStringAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryIECDesignationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryIECDesignation::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryApprovedChemistryWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryApprovedChemistry::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryCapacity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryQuantityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryQuantity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryChargeStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryChargeState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryTimeToFullChargeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryTimeToFullCharge::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryFunctionalWhileChargingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryFunctionalWhileCharging::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeBatteryChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeBatteryChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBatteryChargingCurrentWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::BatteryChargingCurrent::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActiveBatteryChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceActiveBatteryChargeFaultsListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeActiveBatteryChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceActiveBatteryChargeFaultsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPowerSourceActiveBatteryChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeActiveBatteryChargeFaultsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceActiveBatteryChargeFaultsListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::ActiveBatteryChargeFaults::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPPowerSourceConfiguration + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSourcesWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceConfigurationSourcesListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceConfigurationAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPowerSourceConfigurationAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPPressureMeasurement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeScaledValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMinScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxScaledValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeScaledToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeScaleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPressureMeasurementGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPressureMeasurementAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPressureMeasurementAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPressureMeasurementAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPPumpConfigurationAndControl + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMinConstPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxConstPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMinCompPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxCompPressureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMinConstSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxConstSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMinConstFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxConstFlowWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMinConstTempWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxConstTempWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePumpStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePumpStatusWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeEffectiveOperationModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeEffectiveControlModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSpeedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePowerWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeOperationModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeOperationModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpOperationModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeControlModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeControlModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlClusterPumpControlModeAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::AlarmMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAlarmMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::AlarmMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAlarmMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::AlarmMask::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPPumpConfigurationAndControlAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPRelativeHumidityMeasurement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn + = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPScenes + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)addSceneWithParams:(CHIPScenesClusterAddSceneParams *)params + completionHandler: + (void (^)(CHIPScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Scenes::Commands::AddScene::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + request.sceneId = params.sceneId.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.sceneName = [self asCharSpan:params.sceneName]; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.extensionFieldSets.count != 0) { + auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.extensionFieldSets.count; ++i_0) { + if (![params.extensionFieldSets[i_0] isKindOfClass:[CHIPScenesClusterSceneExtensionFieldSet class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (CHIPScenesClusterSceneExtensionFieldSet *) params.extensionFieldSets[i_0]; + listHolder_0->mList[i_0].clusterId = element_0.clusterId.unsignedIntValue; + listHolder_0->mList[i_0].length = element_0.length.unsignedCharValue; + listHolder_0->mList[i_0].value = element_0.value.unsignedCharValue; + } + request.extensionFieldSets = ListType_0(listHolder_0->mList, params.extensionFieldSets.count); + } else { + request.extensionFieldSets = ListType_0(); + } + } + + new CHIPScenesClusterAddSceneResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)viewSceneWithParams:(CHIPScenesClusterViewSceneParams *)params + completionHandler: + (void (^)(CHIPScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Scenes::Commands::ViewScene::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + request.sceneId = params.sceneId.unsignedCharValue; + + new CHIPScenesClusterViewSceneResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)removeSceneWithParams:(CHIPScenesClusterRemoveSceneParams *)params + completionHandler: + (void (^)(CHIPScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Scenes::Commands::RemoveScene::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + request.sceneId = params.sceneId.unsignedCharValue; + + new CHIPScenesClusterRemoveSceneResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)removeAllScenesWithParams:(CHIPScenesClusterRemoveAllScenesParams *)params + completionHandler:(void (^)(CHIPScenesClusterRemoveAllScenesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Scenes::Commands::RemoveAllScenes::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + + new CHIPScenesClusterRemoveAllScenesResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)storeSceneWithParams:(CHIPScenesClusterStoreSceneParams *)params + completionHandler: + (void (^)(CHIPScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Scenes::Commands::StoreScene::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + request.sceneId = params.sceneId.unsignedCharValue; + + new CHIPScenesClusterStoreSceneResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)recallSceneWithParams:(CHIPScenesClusterRecallSceneParams *)params completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Scenes::Commands::RecallScene::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + request.sceneId = params.sceneId.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)getSceneMembershipWithParams:(CHIPScenesClusterGetSceneMembershipParams *)params + completionHandler:(void (^)(CHIPScenesClusterGetSceneMembershipResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Scenes::Commands::GetSceneMembership::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + + new CHIPScenesClusterGetSceneMembershipResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)enhancedAddSceneWithParams:(CHIPScenesClusterEnhancedAddSceneParams *)params + completionHandler:(void (^)(CHIPScenesClusterEnhancedAddSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Scenes::Commands::EnhancedAddScene::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + request.sceneId = params.sceneId.unsignedCharValue; + request.transitionTime = params.transitionTime.unsignedShortValue; + request.sceneName = [self asCharSpan:params.sceneName]; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.extensionFieldSets.count != 0) { + auto * listHolder_0 = new ListHolder(params.extensionFieldSets.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.extensionFieldSets.count; ++i_0) { + if (![params.extensionFieldSets[i_0] isKindOfClass:[CHIPScenesClusterSceneExtensionFieldSet class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (CHIPScenesClusterSceneExtensionFieldSet *) params.extensionFieldSets[i_0]; + listHolder_0->mList[i_0].clusterId = element_0.clusterId.unsignedIntValue; + listHolder_0->mList[i_0].length = element_0.length.unsignedCharValue; + listHolder_0->mList[i_0].value = element_0.value.unsignedCharValue; + } + request.extensionFieldSets = ListType_0(listHolder_0->mList, params.extensionFieldSets.count); + } else { + request.extensionFieldSets = ListType_0(); + } + } + + new CHIPScenesClusterEnhancedAddSceneResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)enhancedViewSceneWithParams:(CHIPScenesClusterEnhancedViewSceneParams *)params + completionHandler:(void (^)(CHIPScenesClusterEnhancedViewSceneResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Scenes::Commands::EnhancedViewScene::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.groupId = params.groupId.unsignedShortValue; + request.sceneId = params.sceneId.unsignedCharValue; + + new CHIPScenesClusterEnhancedViewSceneResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)copySceneWithParams:(CHIPScenesClusterCopySceneParams *)params + completionHandler: + (void (^)(CHIPScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Scenes::Commands::CopyScene::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.mode = static_cast>(params.mode.unsignedCharValue); + request.groupIdFrom = params.groupIdFrom.unsignedShortValue; + request.sceneIdFrom = params.sceneIdFrom.unsignedCharValue; + request.groupIdTo = params.groupIdTo.unsignedShortValue; + request.sceneIdTo = params.sceneIdTo.unsignedCharValue; + + new CHIPScenesClusterCopySceneResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeSceneCountWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSceneCountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentSceneWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentSceneWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentGroupWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentGroupWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSceneValidWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPBooleanAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeSceneValidWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeNameSupportWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeLastConfiguredByWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeLastConfiguredByWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPScenesGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPScenesGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPScenesAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPScenesAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPScenesAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPScenesAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPScenesAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPSoftwareDiagnostics + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)resetWatermarksWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self resetWatermarksWithParams:nil completionHandler:completionHandler]; +} +- (void)resetWatermarksWithParams:(CHIPSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + SoftwareDiagnostics::Commands::ResetWatermarks::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeThreadMetricsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentHeapFreeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentHeapUsedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt64uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSoftwareDiagnosticsAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPSwitch + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeNumberOfPositionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMultiPressMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPSwitchGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSwitchGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPSwitchAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSwitchAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSwitchAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPSwitchAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPSwitchAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPTargetNavigator + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)navigateTargetWithParams:(CHIPTargetNavigatorClusterNavigateTargetParams *)params + completionHandler:(void (^)(CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TargetNavigator::Commands::NavigateTarget::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.target = params.target.unsignedCharValue; + if (params.data != nil) { + auto & definedValue_0 = request.data.Emplace(); + definedValue_0 = [self asCharSpan:params.data]; + } + + new CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeTargetListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTargetNavigatorTargetListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeTargetListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTargetNavigatorTargetListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeCurrentTargetWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTargetNavigatorAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTargetNavigatorAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPTemperatureMeasurement + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation CHIPTestCluster + +- (chip::Controller::ClusterBase *)getCluster +{ + return &_cppCluster; +} + +- (void)testWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self testWithParams:nil completionHandler:completionHandler]; +} +- (void)testWithParams:(CHIPTestClusterClusterTestParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::Test::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self testNotHandledWithParams:nil completionHandler:completionHandler]; +} +- (void)testNotHandledWithParams:(CHIPTestClusterClusterTestNotHandledParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestNotHandled::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testSpecificWithCompletionHandler:(void (^)(CHIPTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self testSpecificWithParams:nil completionHandler:completionHandler]; +} +- (void)testSpecificWithParams:(CHIPTestClusterClusterTestSpecificParams * _Nullable)params + completionHandler:(void (^)(CHIPTestClusterClusterTestSpecificResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestSpecific::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPTestClusterClusterTestSpecificResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testUnknownCommandWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self testUnknownCommandWithParams:nil completionHandler:completionHandler]; +} +- (void)testUnknownCommandWithParams:(CHIPTestClusterClusterTestUnknownCommandParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestUnknownCommand::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testAddArgumentsWithParams:(CHIPTestClusterClusterTestAddArgumentsParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestAddArguments::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1 = params.arg1.unsignedCharValue; + request.arg2 = params.arg2.unsignedCharValue; + + new CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testSimpleArgumentRequestWithParams:(CHIPTestClusterClusterTestSimpleArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestSimpleArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestSimpleArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1 = params.arg1.boolValue; + + new CHIPTestClusterClusterTestSimpleArgumentResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testStructArrayArgumentRequestWithParams:(CHIPTestClusterClusterTestStructArrayArgumentRequestParams *)params + completionHandler: + (void (^)(CHIPTestClusterClusterTestStructArrayArgumentResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestStructArrayArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.arg1.count != 0) { + auto * listHolder_0 = new ListHolder(params.arg1.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { + if (![params.arg1[i_0] isKindOfClass:[CHIPTestClusterClusterNestedStructList class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (CHIPTestClusterClusterNestedStructList *) params.arg1[i_0]; + listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; + listHolder_0->mList[i_0].b = element_0.b.boolValue; + listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue; + listHolder_0->mList[i_0].c.b = element_0.c.b.boolValue; + listHolder_0->mList[i_0].c.c + = static_castmList[i_0].c.c)>>(element_0.c.c.unsignedCharValue); + listHolder_0->mList[i_0].c.d = [self asByteSpan:element_0.c.d]; + listHolder_0->mList[i_0].c.e = [self asCharSpan:element_0.c.e]; + listHolder_0->mList[i_0].c.f + = static_castmList[i_0].c.f)>>(element_0.c.f.unsignedCharValue); + listHolder_0->mList[i_0].c.g = element_0.c.g.floatValue; + listHolder_0->mList[i_0].c.h = element_0.c.h.doubleValue; + { + using ListType_2 = std::remove_reference_tmList[i_0].d)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.d.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.d.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) { + if (![element_0.d[i_2] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (CHIPTestClusterClusterSimpleStruct *) element_0.d[i_2]; + listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; + listHolder_2->mList[i_2].b = element_2.b.boolValue; + listHolder_2->mList[i_2].c = static_castmList[i_2].c)>>( + element_2.c.unsignedCharValue); + listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; + listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; + listHolder_2->mList[i_2].f = static_castmList[i_2].f)>>( + element_2.f.unsignedCharValue); + listHolder_2->mList[i_2].g = element_2.g.floatValue; + listHolder_2->mList[i_2].h = element_2.h.doubleValue; + } + listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0.d.count); + } else { + listHolder_0->mList[i_0].d = ListType_2(); + } + } + { + using ListType_2 = std::remove_reference_tmList[i_0].e)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.e.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.e.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.e.count; ++i_2) { + if (![element_0.e[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (NSNumber *) element_0.e[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedIntValue; + } + listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0.e.count); + } else { + listHolder_0->mList[i_0].e = ListType_2(); + } + } + { + using ListType_2 = std::remove_reference_tmList[i_0].f)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.f.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.f.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.f.count; ++i_2) { + if (![element_0.f[i_2] isKindOfClass:[NSData class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (NSData *) element_0.f[i_2]; + listHolder_2->mList[i_2] = [self asByteSpan:element_2]; + } + listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0.f.count); + } else { + listHolder_0->mList[i_0].f = ListType_2(); + } + } + { + using ListType_2 = std::remove_reference_tmList[i_0].g)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.g.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.g.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.g.count; ++i_2) { + if (![element_0.g[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (NSNumber *) element_0.g[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedCharValue; + } + listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0.g.count); + } else { + listHolder_0->mList[i_0].g = ListType_2(); + } + } + } + request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); + } else { + request.arg1 = ListType_0(); + } + } + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.arg2.count != 0) { + auto * listHolder_0 = new ListHolder(params.arg2.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.arg2.count; ++i_0) { + if (![params.arg2[i_0] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (CHIPTestClusterClusterSimpleStruct *) params.arg2[i_0]; + listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; + listHolder_0->mList[i_0].b = element_0.b.boolValue; + listHolder_0->mList[i_0].c + = static_castmList[i_0].c)>>(element_0.c.unsignedCharValue); + listHolder_0->mList[i_0].d = [self asByteSpan:element_0.d]; + listHolder_0->mList[i_0].e = [self asCharSpan:element_0.e]; + listHolder_0->mList[i_0].f + = static_castmList[i_0].f)>>(element_0.f.unsignedCharValue); + listHolder_0->mList[i_0].g = element_0.g.floatValue; + listHolder_0->mList[i_0].h = element_0.h.doubleValue; + } + request.arg2 = ListType_0(listHolder_0->mList, params.arg2.count); + } else { + request.arg2 = ListType_0(); + } + } + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.arg3.count != 0) { + auto * listHolder_0 = new ListHolder(params.arg3.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.arg3.count; ++i_0) { + if (![params.arg3[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (NSNumber *) params.arg3[i_0]; + listHolder_0->mList[i_0] + = static_castmList[i_0])>>(element_0.unsignedCharValue); + } + request.arg3 = ListType_0(listHolder_0->mList, params.arg3.count); + } else { + request.arg3 = ListType_0(); + } + } + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.arg4.count != 0) { + auto * listHolder_0 = new ListHolder(params.arg4.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.arg4.count; ++i_0) { + if (![params.arg4[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (NSNumber *) params.arg4[i_0]; + listHolder_0->mList[i_0] = element_0.boolValue; + } + request.arg4 = ListType_0(listHolder_0->mList, params.arg4.count); + } else { + request.arg4 = ListType_0(); + } + } + request.arg5 = static_cast>(params.arg5.unsignedCharValue); + request.arg6 = params.arg6.boolValue; + + new CHIPTestClusterClusterTestStructArrayArgumentResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testStructArgumentRequestWithParams:(CHIPTestClusterClusterTestStructArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestStructArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1.a = params.arg1.a.unsignedCharValue; + request.arg1.b = params.arg1.b.boolValue; + request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); + request.arg1.d = [self asByteSpan:params.arg1.d]; + request.arg1.e = [self asCharSpan:params.arg1.e]; + request.arg1.f = static_cast>(params.arg1.f.unsignedCharValue); + request.arg1.g = params.arg1.g.floatValue; + request.arg1.h = params.arg1.h.doubleValue; + + new CHIPTestClusterClusterBooleanResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testNestedStructArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestNestedStructArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1.a = params.arg1.a.unsignedCharValue; + request.arg1.b = params.arg1.b.boolValue; + request.arg1.c.a = params.arg1.c.a.unsignedCharValue; + request.arg1.c.b = params.arg1.c.b.boolValue; + request.arg1.c.c = static_cast>(params.arg1.c.c.unsignedCharValue); + request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; + request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; + request.arg1.c.f = static_cast>(params.arg1.c.f.unsignedCharValue); + request.arg1.c.g = params.arg1.c.g.floatValue; + request.arg1.c.h = params.arg1.c.h.doubleValue; + + new CHIPTestClusterClusterBooleanResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testListStructArgumentRequestWithParams:(CHIPTestClusterClusterTestListStructArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestListStructArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.arg1.count != 0) { + auto * listHolder_0 = new ListHolder(params.arg1.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { + if (![params.arg1[i_0] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (CHIPTestClusterClusterSimpleStruct *) params.arg1[i_0]; + listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; + listHolder_0->mList[i_0].b = element_0.b.boolValue; + listHolder_0->mList[i_0].c + = static_castmList[i_0].c)>>(element_0.c.unsignedCharValue); + listHolder_0->mList[i_0].d = [self asByteSpan:element_0.d]; + listHolder_0->mList[i_0].e = [self asCharSpan:element_0.e]; + listHolder_0->mList[i_0].f + = static_castmList[i_0].f)>>(element_0.f.unsignedCharValue); + listHolder_0->mList[i_0].g = element_0.g.floatValue; + listHolder_0->mList[i_0].h = element_0.h.doubleValue; + } + request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); + } else { + request.arg1 = ListType_0(); + } + } + + new CHIPTestClusterClusterBooleanResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testListInt8UArgumentRequestWithParams:(CHIPTestClusterClusterTestListInt8UArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestListInt8UArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.arg1.count != 0) { + auto * listHolder_0 = new ListHolder(params.arg1.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { + if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (NSNumber *) params.arg1[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; + } + request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); + } else { + request.arg1 = ListType_0(); + } + } + + new CHIPTestClusterClusterBooleanResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testNestedStructListArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestNestedStructListArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1.a = params.arg1.a.unsignedCharValue; + request.arg1.b = params.arg1.b.boolValue; + request.arg1.c.a = params.arg1.c.a.unsignedCharValue; + request.arg1.c.b = params.arg1.c.b.boolValue; + request.arg1.c.c = static_cast>(params.arg1.c.c.unsignedCharValue); + request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; + request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; + request.arg1.c.f = static_cast>(params.arg1.c.f.unsignedCharValue); + request.arg1.c.g = params.arg1.c.g.floatValue; + request.arg1.c.h = params.arg1.c.h.doubleValue; + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.arg1.d.count != 0) { + auto * listHolder_1 = new ListHolder(params.arg1.d.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.arg1.d.count; ++i_1) { + if (![params.arg1.d[i_1] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return; + } + auto element_1 = (CHIPTestClusterClusterSimpleStruct *) params.arg1.d[i_1]; + listHolder_1->mList[i_1].a = element_1.a.unsignedCharValue; + listHolder_1->mList[i_1].b = element_1.b.boolValue; + listHolder_1->mList[i_1].c + = static_castmList[i_1].c)>>(element_1.c.unsignedCharValue); + listHolder_1->mList[i_1].d = [self asByteSpan:element_1.d]; + listHolder_1->mList[i_1].e = [self asCharSpan:element_1.e]; + listHolder_1->mList[i_1].f + = static_castmList[i_1].f)>>(element_1.f.unsignedCharValue); + listHolder_1->mList[i_1].g = element_1.g.floatValue; + listHolder_1->mList[i_1].h = element_1.h.doubleValue; + } + request.arg1.d = ListType_1(listHolder_1->mList, params.arg1.d.count); + } else { + request.arg1.d = ListType_1(); + } + } + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.arg1.e.count != 0) { + auto * listHolder_1 = new ListHolder(params.arg1.e.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.arg1.e.count; ++i_1) { + if (![params.arg1.e[i_1] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_1 = (NSNumber *) params.arg1.e[i_1]; + listHolder_1->mList[i_1] = element_1.unsignedIntValue; + } + request.arg1.e = ListType_1(listHolder_1->mList, params.arg1.e.count); + } else { + request.arg1.e = ListType_1(); + } + } + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.arg1.f.count != 0) { + auto * listHolder_1 = new ListHolder(params.arg1.f.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.arg1.f.count; ++i_1) { + if (![params.arg1.f[i_1] isKindOfClass:[NSData class]]) { + // Wrong kind of value. + return; + } + auto element_1 = (NSData *) params.arg1.f[i_1]; + listHolder_1->mList[i_1] = [self asByteSpan:element_1]; + } + request.arg1.f = ListType_1(listHolder_1->mList, params.arg1.f.count); + } else { + request.arg1.f = ListType_1(); + } + } + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.arg1.g.count != 0) { + auto * listHolder_1 = new ListHolder(params.arg1.g.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.arg1.g.count; ++i_1) { + if (![params.arg1.g[i_1] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_1 = (NSNumber *) params.arg1.g[i_1]; + listHolder_1->mList[i_1] = element_1.unsignedCharValue; + } + request.arg1.g = ListType_1(listHolder_1->mList, params.arg1.g.count); + } else { + request.arg1.g = ListType_1(); + } + } + + new CHIPTestClusterClusterBooleanResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testListNestedStructListArgumentRequestWithParams: + (CHIPTestClusterClusterTestListNestedStructListArgumentRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.arg1.count != 0) { + auto * listHolder_0 = new ListHolder(params.arg1.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { + if (![params.arg1[i_0] isKindOfClass:[CHIPTestClusterClusterNestedStructList class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (CHIPTestClusterClusterNestedStructList *) params.arg1[i_0]; + listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; + listHolder_0->mList[i_0].b = element_0.b.boolValue; + listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue; + listHolder_0->mList[i_0].c.b = element_0.c.b.boolValue; + listHolder_0->mList[i_0].c.c + = static_castmList[i_0].c.c)>>(element_0.c.c.unsignedCharValue); + listHolder_0->mList[i_0].c.d = [self asByteSpan:element_0.c.d]; + listHolder_0->mList[i_0].c.e = [self asCharSpan:element_0.c.e]; + listHolder_0->mList[i_0].c.f + = static_castmList[i_0].c.f)>>(element_0.c.f.unsignedCharValue); + listHolder_0->mList[i_0].c.g = element_0.c.g.floatValue; + listHolder_0->mList[i_0].c.h = element_0.c.h.doubleValue; + { + using ListType_2 = std::remove_reference_tmList[i_0].d)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.d.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.d.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) { + if (![element_0.d[i_2] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (CHIPTestClusterClusterSimpleStruct *) element_0.d[i_2]; + listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; + listHolder_2->mList[i_2].b = element_2.b.boolValue; + listHolder_2->mList[i_2].c = static_castmList[i_2].c)>>( + element_2.c.unsignedCharValue); + listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; + listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; + listHolder_2->mList[i_2].f = static_castmList[i_2].f)>>( + element_2.f.unsignedCharValue); + listHolder_2->mList[i_2].g = element_2.g.floatValue; + listHolder_2->mList[i_2].h = element_2.h.doubleValue; + } + listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0.d.count); + } else { + listHolder_0->mList[i_0].d = ListType_2(); + } + } + { + using ListType_2 = std::remove_reference_tmList[i_0].e)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.e.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.e.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.e.count; ++i_2) { + if (![element_0.e[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (NSNumber *) element_0.e[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedIntValue; + } + listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0.e.count); + } else { + listHolder_0->mList[i_0].e = ListType_2(); + } + } + { + using ListType_2 = std::remove_reference_tmList[i_0].f)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.f.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.f.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.f.count; ++i_2) { + if (![element_0.f[i_2] isKindOfClass:[NSData class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (NSData *) element_0.f[i_2]; + listHolder_2->mList[i_2] = [self asByteSpan:element_2]; + } + listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0.f.count); + } else { + listHolder_0->mList[i_0].f = ListType_2(); + } + } + { + using ListType_2 = std::remove_reference_tmList[i_0].g)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.g.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.g.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.g.count; ++i_2) { + if (![element_0.g[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (NSNumber *) element_0.g[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedCharValue; + } + listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0.g.count); + } else { + listHolder_0->mList[i_0].g = ListType_2(); + } + } + } + request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); + } else { + request.arg1 = ListType_0(); + } + } + + new CHIPTestClusterClusterBooleanResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testListInt8UReverseRequestWithParams:(CHIPTestClusterClusterTestListInt8UReverseRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestListInt8UReverseRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.arg1.count != 0) { + auto * listHolder_0 = new ListHolder(params.arg1.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { + if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (NSNumber *) params.arg1[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; + } + request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); + } else { + request.arg1 = ListType_0(); + } + } + + new CHIPTestClusterClusterTestListInt8UReverseResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testEnumsRequestWithParams:(CHIPTestClusterClusterTestEnumsRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestEnumsResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestEnumsRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1 = static_cast>(params.arg1.unsignedShortValue); + request.arg2 = static_cast>(params.arg2.unsignedCharValue); + + new CHIPTestClusterClusterTestEnumsResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testNullableOptionalRequestWithParams:(CHIPTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params + completionHandler:(void (^)(CHIPTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestNullableOptionalRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (params != nil) { + if (params.arg1 != nil) { + auto & definedValue_0 = request.arg1.Emplace(); + if (params.arg1 == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = params.arg1.unsignedCharValue; + } + } + } + + new CHIPTestClusterClusterTestNullableOptionalResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testComplexNullableOptionalRequestWithParams:(CHIPTestClusterClusterTestComplexNullableOptionalRequestParams *)params + completionHandler: + (void (^)(CHIPTestClusterClusterTestComplexNullableOptionalResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestComplexNullableOptionalRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (params.nullableInt == nil) { + request.nullableInt.SetNull(); + } else { + auto & nonNullValue_0 = request.nullableInt.SetNonNull(); + nonNullValue_0 = params.nullableInt.unsignedShortValue; + } + if (params.optionalInt != nil) { + auto & definedValue_0 = request.optionalInt.Emplace(); + definedValue_0 = params.optionalInt.unsignedShortValue; + } + if (params.nullableOptionalInt != nil) { + auto & definedValue_0 = request.nullableOptionalInt.Emplace(); + if (params.nullableOptionalInt == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = params.nullableOptionalInt.unsignedShortValue; + } + } + if (params.nullableString == nil) { + request.nullableString.SetNull(); + } else { + auto & nonNullValue_0 = request.nullableString.SetNonNull(); + nonNullValue_0 = [self asCharSpan:params.nullableString]; + } + if (params.optionalString != nil) { + auto & definedValue_0 = request.optionalString.Emplace(); + definedValue_0 = [self asCharSpan:params.optionalString]; + } + if (params.nullableOptionalString != nil) { + auto & definedValue_0 = request.nullableOptionalString.Emplace(); + if (params.nullableOptionalString == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = [self asCharSpan:params.nullableOptionalString]; + } + } + if (params.nullableStruct == nil) { + request.nullableStruct.SetNull(); + } else { + auto & nonNullValue_0 = request.nullableStruct.SetNonNull(); + nonNullValue_0.a = params.nullableStruct.a.unsignedCharValue; + nonNullValue_0.b = params.nullableStruct.b.boolValue; + nonNullValue_0.c + = static_cast>(params.nullableStruct.c.unsignedCharValue); + nonNullValue_0.d = [self asByteSpan:params.nullableStruct.d]; + nonNullValue_0.e = [self asCharSpan:params.nullableStruct.e]; + nonNullValue_0.f + = static_cast>(params.nullableStruct.f.unsignedCharValue); + nonNullValue_0.g = params.nullableStruct.g.floatValue; + nonNullValue_0.h = params.nullableStruct.h.doubleValue; + } + if (params.optionalStruct != nil) { + auto & definedValue_0 = request.optionalStruct.Emplace(); + definedValue_0.a = params.optionalStruct.a.unsignedCharValue; + definedValue_0.b = params.optionalStruct.b.boolValue; + definedValue_0.c + = static_cast>(params.optionalStruct.c.unsignedCharValue); + definedValue_0.d = [self asByteSpan:params.optionalStruct.d]; + definedValue_0.e = [self asCharSpan:params.optionalStruct.e]; + definedValue_0.f + = static_cast>(params.optionalStruct.f.unsignedCharValue); + definedValue_0.g = params.optionalStruct.g.floatValue; + definedValue_0.h = params.optionalStruct.h.doubleValue; + } + if (params.nullableOptionalStruct != nil) { + auto & definedValue_0 = request.nullableOptionalStruct.Emplace(); + if (params.nullableOptionalStruct == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1.a = params.nullableOptionalStruct.a.unsignedCharValue; + nonNullValue_1.b = params.nullableOptionalStruct.b.boolValue; + nonNullValue_1.c = static_cast>( + params.nullableOptionalStruct.c.unsignedCharValue); + nonNullValue_1.d = [self asByteSpan:params.nullableOptionalStruct.d]; + nonNullValue_1.e = [self asCharSpan:params.nullableOptionalStruct.e]; + nonNullValue_1.f = static_cast>( + params.nullableOptionalStruct.f.unsignedCharValue); + nonNullValue_1.g = params.nullableOptionalStruct.g.floatValue; + nonNullValue_1.h = params.nullableOptionalStruct.h.doubleValue; + } + } + if (params.nullableList == nil) { + request.nullableList.SetNull(); + } else { + auto & nonNullValue_0 = request.nullableList.SetNonNull(); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.nullableList.count != 0) { + auto * listHolder_1 = new ListHolder(params.nullableList.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.nullableList.count; ++i_1) { + if (![params.nullableList[i_1] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_1 = (NSNumber *) params.nullableList[i_1]; + listHolder_1->mList[i_1] + = static_castmList[i_1])>>(element_1.unsignedCharValue); + } + nonNullValue_0 = ListType_1(listHolder_1->mList, params.nullableList.count); + } else { + nonNullValue_0 = ListType_1(); + } + } + } + if (params.optionalList != nil) { + auto & definedValue_0 = request.optionalList.Emplace(); + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (params.optionalList.count != 0) { + auto * listHolder_1 = new ListHolder(params.optionalList.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < params.optionalList.count; ++i_1) { + if (![params.optionalList[i_1] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_1 = (NSNumber *) params.optionalList[i_1]; + listHolder_1->mList[i_1] + = static_castmList[i_1])>>(element_1.unsignedCharValue); + } + definedValue_0 = ListType_1(listHolder_1->mList, params.optionalList.count); + } else { + definedValue_0 = ListType_1(); + } + } + } + if (params.nullableOptionalList != nil) { + auto & definedValue_0 = request.nullableOptionalList.Emplace(); + if (params.nullableOptionalList == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + { + using ListType_2 = std::remove_reference_t; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (params.nullableOptionalList.count != 0) { + auto * listHolder_2 = new ListHolder(params.nullableOptionalList.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < params.nullableOptionalList.count; ++i_2) { + if (![params.nullableOptionalList[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_2 = (NSNumber *) params.nullableOptionalList[i_2]; + listHolder_2->mList[i_2] + = static_castmList[i_2])>>(element_2.unsignedCharValue); + } + nonNullValue_1 = ListType_2(listHolder_2->mList, params.nullableOptionalList.count); + } else { + nonNullValue_1 = ListType_2(); + } + } + } + } + + new CHIPTestClusterClusterTestComplexNullableOptionalResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)simpleStructEchoRequestWithParams:(CHIPTestClusterClusterSimpleStructEchoRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterSimpleStructResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::SimpleStructEchoRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1.a = params.arg1.a.unsignedCharValue; + request.arg1.b = params.arg1.b.boolValue; + request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); + request.arg1.d = [self asByteSpan:params.arg1.d]; + request.arg1.e = [self asCharSpan:params.arg1.e]; + request.arg1.f = static_cast>(params.arg1.f.unsignedCharValue); + request.arg1.g = params.arg1.g.floatValue; + request.arg1.h = params.arg1.h.doubleValue; + + new CHIPTestClusterClusterSimpleStructResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)timedInvokeRequestWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self timedInvokeRequestWithParams:nil completionHandler:completionHandler]; +} +- (void)timedInvokeRequestWithParams:(CHIPTestClusterClusterTimedInvokeRequestParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TimedInvokeRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)testSimpleOptionalArgumentRequestWithParams: + (CHIPTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - return &_cppCluster; -} + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + if (params != nil) { + if (params.arg1 != nil) { + auto & definedValue_0 = request.arg1.Emplace(); + definedValue_0 = params.arg1.boolValue; + } + } -- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)testEmitTestEventRequestWithParams:(CHIPTestClusterClusterTestEmitTestEventRequestParams *)params + completionHandler:(void (^)(CHIPTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - auto successFn = Callback::FromCancelable(success); + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestEmitTestEventRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.arg1 = params.arg1.unsignedCharValue; + request.arg2 = static_cast>(params.arg2.unsignedCharValue); + request.arg3 = params.arg3.boolValue; + + new CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -+ (void)readAttributeNumberOfPositionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)testEmitTestFabricScopedEventRequestWithParams:(CHIPTestClusterClusterTestEmitTestFabricScopedEventRequestParams *)params + completionHandler: + (void (^)( + CHIPTestClusterClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + TestCluster::Commands::TestEmitTestFabricScopedEventRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); + } + request.arg1 = params.arg1.unsignedCharValue; + + new CHIPTestClusterClusterTestEmitTestFabricScopedEventResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn + = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); } -- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + [self writeAttributeBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - -+ (void)readAttributeCurrentPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } - return CHIP_ERROR_NOT_FOUND; - }); -} + } -- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); } -- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMultiPressMaxWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -41910,189 +59948,89 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPSwitchGeneratedCommandListListAttributeCallbackBridge( + new CHIPTestClusterBitmap8AttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPSwitchGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeBitmap8WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPSwitchAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - new CHIPSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPSwitchAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPSwitchAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPSwitchAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPTestClusterBitmap8AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBitmap8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPSwitchAttributeListListAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPTestClusterBitmap8AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42102,57 +60040,90 @@ new CHIPSwitchAttributeListListAttributeCallbackBridge(queue, completionHandler, }); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBitmap16WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterBitmap16AttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + [self writeAttributeBitmap16WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedShortValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTestClusterBitmap16AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, - subscriptionEstablishedHandler); -} - -+ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + subscriptionEstablishedHandler); +} + ++ (void)readAttributeBitmap16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPTestClusterBitmap16AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42162,59 +60133,90 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeBitmap32WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterBitmap32AttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + [self writeAttributeBitmap32WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedIntValue); + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTestClusterBitmap32AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBitmap32WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPTestClusterBitmap32AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42224,121 +60226,146 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPTargetNavigator - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeBitmap64WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPTestClusterBitmap64AttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)navigateTargetWithParams:(CHIPTargetNavigatorClusterNavigateTargetParams *)params - completionHandler:(void (^)(CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TargetNavigator::Commands::NavigateTarget::Type request; + [self writeAttributeBitmap64WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - request.target = params.target.unsignedCharValue; - if (params.data != nil) { - auto & definedValue_0 = request.data.Emplace(); - definedValue_0 = [self asCharSpan:params.data]; - } - - new CHIPTargetNavigatorClusterNavigateTargetResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} -- (void)readAttributeTargetListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPTargetNavigatorTargetListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedLongLongValue); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge( + new CHIPTestClusterBitmap64AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeTargetListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBitmap64WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTargetNavigatorTargetListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPTestClusterBitmap64AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -42347,7 +60374,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -42359,16 +60386,15 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeCurrentTargetWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -42384,252 +60410,179 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + [self writeAttributeInt16uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPTargetNavigatorGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTargetNavigatorAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPTargetNavigatorAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPTargetNavigatorAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self writeAttributeInt24uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt24uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42639,69 +60592,88 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPTemperatureMeasurement - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + [self writeAttributeInt32uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt32uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42711,60 +60683,88 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeInt40uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt40uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42774,60 +60774,88 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeInt48uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt48uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42837,57 +60865,88 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + [self writeAttributeInt56uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeToleranceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt56uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -42897,122 +60956,179 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeInt64uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt64uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTemperatureMeasurementAttributeListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeInt8sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -43022,830 +61138,660 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPTestCluster - -- (chip::Controller::ClusterBase *)getCluster -{ - return &_cppCluster; -} - -- (void)simpleStructEchoRequestWithParams:(CHIPTestClusterClusterSimpleStructEchoRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterSimpleStructResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::SimpleStructEchoRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); - request.arg1.d = [self asByteSpan:params.arg1.d]; - request.arg1.e = [self asCharSpan:params.arg1.e]; - request.arg1.f = static_cast>(params.arg1.f.unsignedCharValue); - request.arg1.g = params.arg1.g.floatValue; - request.arg1.h = params.arg1.h.doubleValue; - - new CHIPTestClusterClusterSimpleStructResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)testWithCompletionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self testWithParams:nil completionHandler:completionHandler]; + [self writeAttributeInt16sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)testWithParams:(CHIPTestClusterClusterTestParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::Test::Type request; + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)testAddArgumentsWithParams:(CHIPTestClusterClusterTestAddArgumentsParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestAddArguments::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.arg1 = params.arg1.unsignedCharValue; - request.arg2 = params.arg2.unsignedCharValue; - - new CHIPTestClusterClusterTestAddArgumentsResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)testEmitTestEventRequestWithParams:(CHIPTestClusterClusterTestEmitTestEventRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterTestEmitTestEventResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestEmitTestEventRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.arg1 = params.arg1.unsignedCharValue; - request.arg2 = static_cast>(params.arg2.unsignedCharValue); - request.arg3 = params.arg3.boolValue; - - new CHIPTestClusterClusterTestEmitTestEventResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)testEnumsRequestWithParams:(CHIPTestClusterClusterTestEnumsRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterTestEnumsResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)readAttributeInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestEnumsRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.arg1 = static_cast>(params.arg1.unsignedShortValue); - request.arg2 = static_cast>(params.arg2.unsignedCharValue); - - new CHIPTestClusterClusterTestEnumsResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + new CHIPInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)testListInt8UArgumentRequestWithParams:(CHIPTestClusterClusterTestListInt8UArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestListInt8UArgumentRequest::Type request; + [self writeAttributeInt24sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return; - } - auto element_0 = (NSNumber *) params.arg1[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - new CHIPTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.intValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)testListInt8UReverseRequestWithParams:(CHIPTestClusterClusterTestListInt8UReverseRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterTestListInt8UReverseResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestListInt8UReverseRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return; - } - auto element_0 = (NSNumber *) params.arg1[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; + new CHIPInt32sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); - } - } - - new CHIPTestClusterClusterTestListInt8UReverseResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)testListNestedStructListArgumentRequestWithParams: - (CHIPTestClusterClusterTestListNestedStructListArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeInt24sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestListNestedStructListArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[CHIPTestClusterClusterNestedStructList class]]) { - // Wrong kind of value. - return; - } - auto element_0 = (CHIPTestClusterClusterNestedStructList *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c.a = element_0.c.a.unsignedCharValue; - listHolder_0->mList[i_0].c.b = element_0.c.b.boolValue; - listHolder_0->mList[i_0].c.c - = static_castmList[i_0].c.c)>>(element_0.c.c.unsignedCharValue); - listHolder_0->mList[i_0].c.d = [self asByteSpan:element_0.c.d]; - listHolder_0->mList[i_0].c.e = [self asCharSpan:element_0.c.e]; - listHolder_0->mList[i_0].c.f - = static_castmList[i_0].c.f)>>(element_0.c.f.unsignedCharValue); - listHolder_0->mList[i_0].c.g = element_0.c.g.floatValue; - listHolder_0->mList[i_0].c.h = element_0.c.h.doubleValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].d)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.d.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.d.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.d.count; ++i_2) { - if (![element_0.d[i_2] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { - // Wrong kind of value. - return; - } - auto element_2 = (CHIPTestClusterClusterSimpleStruct *) element_0.d[i_2]; - listHolder_2->mList[i_2].a = element_2.a.unsignedCharValue; - listHolder_2->mList[i_2].b = element_2.b.boolValue; - listHolder_2->mList[i_2].c = static_castmList[i_2].c)>>( - element_2.c.unsignedCharValue); - listHolder_2->mList[i_2].d = [self asByteSpan:element_2.d]; - listHolder_2->mList[i_2].e = [self asCharSpan:element_2.e]; - listHolder_2->mList[i_2].f = static_castmList[i_2].f)>>( - element_2.f.unsignedCharValue); - listHolder_2->mList[i_2].g = element_2.g.floatValue; - listHolder_2->mList[i_2].h = element_2.h.doubleValue; - } - listHolder_0->mList[i_0].d = ListType_2(listHolder_2->mList, element_0.d.count); - } else { - listHolder_0->mList[i_0].d = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].e)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.e.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.e.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.e.count; ++i_2) { - if (![element_0.e[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return; - } - auto element_2 = (NSNumber *) element_0.e[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedIntValue; - } - listHolder_0->mList[i_0].e = ListType_2(listHolder_2->mList, element_0.e.count); - } else { - listHolder_0->mList[i_0].e = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].f)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.f.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.f.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.f.count; ++i_2) { - if (![element_0.f[i_2] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return; - } - auto element_2 = (NSData *) element_0.f[i_2]; - listHolder_2->mList[i_2] = [self asByteSpan:element_2]; - } - listHolder_0->mList[i_0].f = ListType_2(listHolder_2->mList, element_0.f.count); - } else { - listHolder_0->mList[i_0].f = ListType_2(); - } - } - { - using ListType_2 = std::remove_reference_tmList[i_0].g)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.g.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.g.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.g.count; ++i_2) { - if (![element_0.g[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return; - } - auto element_2 = (NSNumber *) element_0.g[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedCharValue; - } - listHolder_0->mList[i_0].g = ListType_2(listHolder_2->mList, element_0.g.count); - } else { - listHolder_0->mList[i_0].g = ListType_2(); - } - } + new CHIPInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); + return err; } - } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); +- (void)readAttributeInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)testListStructArgumentRequestWithParams:(CHIPTestClusterClusterTestListStructArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestListStructArgumentRequest::Type request; + [self writeAttributeInt32sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.arg1.count != 0) { - auto * listHolder_0 = new ListHolder(params.arg1.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.arg1.count; ++i_0) { - if (![params.arg1[i_0] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { - // Wrong kind of value. - return; - } - auto element_0 = (CHIPTestClusterClusterSimpleStruct *) params.arg1[i_0]; - listHolder_0->mList[i_0].a = element_0.a.unsignedCharValue; - listHolder_0->mList[i_0].b = element_0.b.boolValue; - listHolder_0->mList[i_0].c - = static_castmList[i_0].c)>>(element_0.c.unsignedCharValue); - listHolder_0->mList[i_0].d = [self asByteSpan:element_0.d]; - listHolder_0->mList[i_0].e = [self asCharSpan:element_0.e]; - listHolder_0->mList[i_0].f - = static_castmList[i_0].f)>>(element_0.f.unsignedCharValue); - listHolder_0->mList[i_0].g = element_0.g.floatValue; - listHolder_0->mList[i_0].h = element_0.h.doubleValue; - } - request.arg1 = ListType_0(listHolder_0->mList, params.arg1.count); - } else { - request.arg1 = ListType_0(); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - new CHIPTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.intValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)testNestedStructArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestNestedStructArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c.a = params.arg1.c.a.unsignedCharValue; - request.arg1.c.b = params.arg1.c.b.boolValue; - request.arg1.c.c = static_cast>(params.arg1.c.c.unsignedCharValue); - request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; - request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; - request.arg1.c.f = static_cast>(params.arg1.c.f.unsignedCharValue); - request.arg1.c.g = params.arg1.c.g.floatValue; - request.arg1.c.h = params.arg1.c.h.doubleValue; - - new CHIPTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPInt32sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)testNestedStructListArgumentRequestWithParams:(CHIPTestClusterClusterTestNestedStructListArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeInt32sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestNestedStructListArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c.a = params.arg1.c.a.unsignedCharValue; - request.arg1.c.b = params.arg1.c.b.boolValue; - request.arg1.c.c = static_cast>(params.arg1.c.c.unsignedCharValue); - request.arg1.c.d = [self asByteSpan:params.arg1.c.d]; - request.arg1.c.e = [self asCharSpan:params.arg1.c.e]; - request.arg1.c.f = static_cast>(params.arg1.c.f.unsignedCharValue); - request.arg1.c.g = params.arg1.c.g.floatValue; - request.arg1.c.h = params.arg1.c.h.doubleValue; - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.d.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.d.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.d.count; ++i_1) { - if (![params.arg1.d[i_1] isKindOfClass:[CHIPTestClusterClusterSimpleStruct class]]) { - // Wrong kind of value. - return; - } - auto element_1 = (CHIPTestClusterClusterSimpleStruct *) params.arg1.d[i_1]; - listHolder_1->mList[i_1].a = element_1.a.unsignedCharValue; - listHolder_1->mList[i_1].b = element_1.b.boolValue; - listHolder_1->mList[i_1].c - = static_castmList[i_1].c)>>(element_1.c.unsignedCharValue); - listHolder_1->mList[i_1].d = [self asByteSpan:element_1.d]; - listHolder_1->mList[i_1].e = [self asCharSpan:element_1.e]; - listHolder_1->mList[i_1].f - = static_castmList[i_1].f)>>(element_1.f.unsignedCharValue); - listHolder_1->mList[i_1].g = element_1.g.floatValue; - listHolder_1->mList[i_1].h = element_1.h.doubleValue; - } - request.arg1.d = ListType_1(listHolder_1->mList, params.arg1.d.count); - } else { - request.arg1.d = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.e.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.e.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.e.count; ++i_1) { - if (![params.arg1.e[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return; - } - auto element_1 = (NSNumber *) params.arg1.e[i_1]; - listHolder_1->mList[i_1] = element_1.unsignedIntValue; - } - request.arg1.e = ListType_1(listHolder_1->mList, params.arg1.e.count); - } else { - request.arg1.e = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.f.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.f.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.f.count; ++i_1) { - if (![params.arg1.f[i_1] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return; - } - auto element_1 = (NSData *) params.arg1.f[i_1]; - listHolder_1->mList[i_1] = [self asByteSpan:element_1]; - } - request.arg1.f = ListType_1(listHolder_1->mList, params.arg1.f.count); - } else { - request.arg1.f = ListType_1(); - } - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (params.arg1.g.count != 0) { - auto * listHolder_1 = new ListHolder(params.arg1.g.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < params.arg1.g.count; ++i_1) { - if (![params.arg1.g[i_1] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return; - } - auto element_1 = (NSNumber *) params.arg1.g[i_1]; - listHolder_1->mList[i_1] = element_1.unsignedCharValue; + new CHIPInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - request.arg1.g = ListType_1(listHolder_1->mList, params.arg1.g.count); - } else { - request.arg1.g = ListType_1(); + return err; } - } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); +- (void)readAttributeInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)testNotHandledWithCompletionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self testNotHandledWithParams:nil completionHandler:completionHandler]; + [self writeAttributeInt40sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)testNotHandledWithParams:(CHIPTestClusterClusterTestNotHandledParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestNotHandled::Type request; + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)testNullableOptionalRequestWithParams:(CHIPTestClusterClusterTestNullableOptionalRequestParams * _Nullable)params - completionHandler:(void (^)(CHIPTestClusterClusterTestNullableOptionalResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestNullableOptionalRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - if (params != nil) { - if (params.arg1 != nil) { - auto & definedValue_0 = request.arg1.Emplace(); - if (params.arg1 == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = params.arg1.unsignedCharValue; + new CHIPInt64sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - } - } - - new CHIPTestClusterClusterTestNullableOptionalResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)testSimpleOptionalArgumentRequestWithParams: - (CHIPTestClusterClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeInt40sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestSimpleOptionalArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeInt48sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.arg1 != nil) { - auto & definedValue_0 = request.arg1.Emplace(); - definedValue_0 = params.arg1.boolValue; + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)testSpecificWithCompletionHandler:(void (^)(CHIPTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self testSpecificWithParams:nil completionHandler:completionHandler]; -} -- (void)testSpecificWithParams:(CHIPTestClusterClusterTestSpecificParams * _Nullable)params - completionHandler:(void (^)(CHIPTestClusterClusterTestSpecificResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler +- (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestSpecific::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPTestClusterClusterTestSpecificResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + new CHIPInt64sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)testStructArgumentRequestWithParams:(CHIPTestClusterClusterTestStructArgumentRequestParams *)params - completionHandler:(void (^)(CHIPTestClusterClusterBooleanResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler ++ (void)readAttributeInt48sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestStructArgumentRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.arg1.a = params.arg1.a.unsignedCharValue; - request.arg1.b = params.arg1.b.boolValue; - request.arg1.c = static_cast>(params.arg1.c.unsignedCharValue); - request.arg1.d = [self asByteSpan:params.arg1.d]; - request.arg1.e = [self asCharSpan:params.arg1.e]; - request.arg1.f = static_cast>(params.arg1.f.unsignedCharValue); - request.arg1.g = params.arg1.g.floatValue; - request.arg1.h = params.arg1.h.doubleValue; + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPTestClusterClusterBooleanResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); +- (void)readAttributeInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)testUnknownCommandWithCompletionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self testUnknownCommandWithParams:nil completionHandler:completionHandler]; + [self writeAttributeInt56sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)testUnknownCommandWithParams:(CHIPTestClusterClusterTestUnknownCommandParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TestUnknownCommand::Type request; + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)timedInvokeRequestWithCompletionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self timedInvokeRequestWithParams:nil completionHandler:completionHandler]; + new CHIPInt64sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)timedInvokeRequestWithParams:(CHIPTestClusterClusterTimedInvokeRequestParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + ++ (void)readAttributeInt56sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - TestCluster::Commands::TimedInvokeRequest::Type request; + new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeInt64sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); } } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - new CHIPCommandSuccessCallbackBridge( + new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { + ^(id _Nullable ignored, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)readAttributeBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt64sAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeInt64sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeEnum8WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -43861,9 +61807,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.boolValue; + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -43871,46 +61817,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnum8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Boolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -43920,24 +61866,23 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterBitmap8AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBitmap8WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeEnum16WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -43953,9 +61898,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -43963,46 +61908,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterBitmap8AttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBitmap8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnum16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterBitmap8AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44012,25 +61957,24 @@ new CHIPTestClusterBitmap8AttributeCallbackBridge(queue, completionHandler, ^(Ca }); } -- (void)readAttributeBitmap16WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFloatSingleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterBitmap16AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBitmap16WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -44046,9 +61990,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); + cppValue = value.floatValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -44056,46 +62000,47 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterBitmap16AttributeCallbackSubscriptionBridge( + new CHIPFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBitmap16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFloatSingleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterBitmap16AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44105,25 +62050,24 @@ new CHIPTestClusterBitmap16AttributeCallbackBridge(queue, completionHandler, ^(C }); } -- (void)readAttributeBitmap32WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFloatDoubleWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterBitmap32AttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPDoubleAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBitmap32WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -44139,9 +62083,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedIntValue); + cppValue = value.doubleValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -44149,46 +62093,47 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterBitmap32AttributeCallbackSubscriptionBridge( + new CHIPDoubleAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBitmap32WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFloatDoubleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterBitmap32AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44198,25 +62143,25 @@ new CHIPTestClusterBitmap32AttributeCallbackBridge(queue, completionHandler, ^(C }); } -- (void)readAttributeBitmap64WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOctetStringWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterBitmap64AttributeCallbackBridge( + new CHIPOctetStringAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeBitmap64WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeOctetStringWithValue:(NSData * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -44232,9 +62177,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedLongLongValue); + cppValue = [self asByteSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -44242,46 +62187,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterBitmap64AttributeCallbackSubscriptionBridge( + new CHIPOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeBitmap64WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterBitmap64AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44291,23 +62236,25 @@ new CHIPTestClusterBitmap64AttributeCallbackBridge(queue, completionHandler, ^(C }); } -- (void)readAttributeInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeListInt8uWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterListInt8uListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeListInt8uWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -44323,9 +62270,30 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) value[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -44333,72 +62301,75 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterListInt8uListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeListInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int8u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterListInt8uListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeListOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterListOctetStringListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt16uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeListOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -44414,9 +62385,30 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -44424,72 +62416,77 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeListOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int16u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterListOctetStringListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeListStructOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterListStructOctetStringListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt24uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -44505,9 +62502,31 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPTestClusterClusterTestListStructOctet class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (CHIPTestClusterClusterTestListStructOctet *) value[i_0]; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedLongLongValue; + listHolder_0->mList[i_0].operationalCert = [self asByteSpan:element_0.operationalCert]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -44515,72 +62534,78 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt24uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeListStructOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int24u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterListStructOctetStringListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLongOctetStringWithCompletionHandler:(void (^)( + NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPOctetStringAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt32uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeLongOctetStringWithValue:(NSData * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -44596,9 +62621,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + cppValue = [self asByteSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -44606,46 +62631,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt32uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLongOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int32u::TypeInfo; + using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44655,23 +62682,24 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCharStringWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt40uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeCharStringWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -44687,9 +62715,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -44697,46 +62725,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt40uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int40u::TypeInfo; + using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44746,23 +62774,24 @@ new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLongCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt48uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeLongCharStringWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -44778,9 +62807,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + cppValue = [self asCharSpan:value]; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -44788,46 +62817,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt48uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLongCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int48u::TypeInfo; + using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -44837,23 +62868,23 @@ new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEpochUsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt56uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeEpochUsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -44869,7 +62900,7 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; TypeInfo::Type cppValue; cppValue = value.unsignedLongLongValue; auto successFn = Callback::FromCancelable(success); @@ -44879,11 +62910,11 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -44892,7 +62923,7 @@ new CHIPInt64uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -44904,15 +62935,15 @@ new CHIPInt64uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeInt56uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEpochUsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int56u::TypeInfo; + using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -44928,21 +62959,21 @@ new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEpochSWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt64uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeEpochSWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler { @@ -44960,9 +62991,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -44970,46 +63001,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt64uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeEpochSWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int64u::TypeInfo; + using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -45019,23 +63050,24 @@ new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt8sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeVendorIdWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45051,9 +63083,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.charValue; + cppValue = static_cast>(value.unsignedShortValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45061,46 +63093,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8sAttributeCallbackSubscriptionBridge( + new CHIPVendorIdAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorIdWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int8s::TypeInfo; + using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -45110,23 +63142,28 @@ new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt16sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45142,9 +63179,202 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPTestClusterClusterNullablesAndOptionalsStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (CHIPTestClusterClusterNullablesAndOptionalsStruct *) value[i_0]; + if (element_0.nullableInt == nil) { + listHolder_0->mList[i_0].nullableInt.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableInt.SetNonNull(); + nonNullValue_2 = element_0.nullableInt.unsignedShortValue; + } + if (element_0.optionalInt != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalInt.Emplace(); + definedValue_2 = element_0.optionalInt.unsignedShortValue; + } + if (element_0.nullableOptionalInt != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalInt.Emplace(); + if (element_0.nullableOptionalInt == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = element_0.nullableOptionalInt.unsignedShortValue; + } + } + if (element_0.nullableString == nil) { + listHolder_0->mList[i_0].nullableString.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableString.SetNonNull(); + nonNullValue_2 = [self asCharSpan:element_0.nullableString]; + } + if (element_0.optionalString != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); + definedValue_2 = [self asCharSpan:element_0.optionalString]; + } + if (element_0.nullableOptionalString != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalString.Emplace(); + if (element_0.nullableOptionalString == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = [self asCharSpan:element_0.nullableOptionalString]; + } + } + if (element_0.nullableStruct == nil) { + listHolder_0->mList[i_0].nullableStruct.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableStruct.SetNonNull(); + nonNullValue_2.a = element_0.nullableStruct.a.unsignedCharValue; + nonNullValue_2.b = element_0.nullableStruct.b.boolValue; + nonNullValue_2.c = static_cast>( + element_0.nullableStruct.c.unsignedCharValue); + nonNullValue_2.d = [self asByteSpan:element_0.nullableStruct.d]; + nonNullValue_2.e = [self asCharSpan:element_0.nullableStruct.e]; + nonNullValue_2.f = static_cast>( + element_0.nullableStruct.f.unsignedCharValue); + nonNullValue_2.g = element_0.nullableStruct.g.floatValue; + nonNullValue_2.h = element_0.nullableStruct.h.doubleValue; + } + if (element_0.optionalStruct != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalStruct.Emplace(); + definedValue_2.a = element_0.optionalStruct.a.unsignedCharValue; + definedValue_2.b = element_0.optionalStruct.b.boolValue; + definedValue_2.c = static_cast>( + element_0.optionalStruct.c.unsignedCharValue); + definedValue_2.d = [self asByteSpan:element_0.optionalStruct.d]; + definedValue_2.e = [self asCharSpan:element_0.optionalStruct.e]; + definedValue_2.f = static_cast>( + element_0.optionalStruct.f.unsignedCharValue); + definedValue_2.g = element_0.optionalStruct.g.floatValue; + definedValue_2.h = element_0.optionalStruct.h.doubleValue; + } + if (element_0.nullableOptionalStruct != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalStruct.Emplace(); + if (element_0.nullableOptionalStruct == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3.a = element_0.nullableOptionalStruct.a.unsignedCharValue; + nonNullValue_3.b = element_0.nullableOptionalStruct.b.boolValue; + nonNullValue_3.c = static_cast>( + element_0.nullableOptionalStruct.c.unsignedCharValue); + nonNullValue_3.d = [self asByteSpan:element_0.nullableOptionalStruct.d]; + nonNullValue_3.e = [self asCharSpan:element_0.nullableOptionalStruct.e]; + nonNullValue_3.f = static_cast>( + element_0.nullableOptionalStruct.f.unsignedCharValue); + nonNullValue_3.g = element_0.nullableOptionalStruct.g.floatValue; + nonNullValue_3.h = element_0.nullableOptionalStruct.h.doubleValue; + } + } + if (element_0.nullableList == nil) { + listHolder_0->mList[i_0].nullableList.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableList.SetNonNull(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_0.nullableList.count != 0) { + auto * listHolder_3 = new ListHolder(element_0.nullableList.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_0.nullableList.count; ++i_3) { + if (![element_0.nullableList[i_3] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_3 = (NSNumber *) element_0.nullableList[i_3]; + listHolder_3->mList[i_3] + = static_castmList[i_3])>>( + element_3.unsignedCharValue); + } + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.nullableList.count); + } else { + nonNullValue_2 = ListType_3(); + } + } + } + if (element_0.optionalList != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalList.Emplace(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_0.optionalList.count != 0) { + auto * listHolder_3 = new ListHolder(element_0.optionalList.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_0.optionalList.count; ++i_3) { + if (![element_0.optionalList[i_3] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_3 = (NSNumber *) element_0.optionalList[i_3]; + listHolder_3->mList[i_3] + = static_castmList[i_3])>>( + element_3.unsignedCharValue); + } + definedValue_2 = ListType_3(listHolder_3->mList, element_0.optionalList.count); + } else { + definedValue_2 = ListType_3(); + } + } + } + if (element_0.nullableOptionalList != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalList.Emplace(); + if (element_0.nullableOptionalList == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + { + using ListType_4 = std::remove_reference_t; + using ListMemberType_4 = ListMemberTypeGetter::Type; + if (element_0.nullableOptionalList.count != 0) { + auto * listHolder_4 + = new ListHolder(element_0.nullableOptionalList.count); + if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_4); + for (size_t i_4 = 0; i_4 < element_0.nullableOptionalList.count; ++i_4) { + if (![element_0.nullableOptionalList[i_4] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_4 = (NSNumber *) element_0.nullableOptionalList[i_4]; + listHolder_4->mList[i_4] + = static_castmList[i_4])>>( + element_4.unsignedCharValue); + } + nonNullValue_3 = ListType_4(listHolder_4->mList, element_0.nullableOptionalList.count); + } else { + nonNullValue_3 = ListType_4(); + } + } + } + } + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45152,72 +63382,78 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int16s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEnumAttrWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterClusterSimpleEnumAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt24sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45233,9 +63469,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.intValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45243,72 +63479,78 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32sAttributeCallbackSubscriptionBridge( + new CHIPTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt24sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEnumAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int24s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterClusterSimpleEnumAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStructAttrWithCompletionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterStructAttrStructAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeStructAttrWithValue:(CHIPTestClusterClusterSimpleStruct * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt32sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeStructAttrWithValue:(CHIPTestClusterClusterSimpleStruct * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeStructAttrWithValue:(CHIPTestClusterClusterSimpleStruct * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45324,9 +63566,16 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.intValue; + cppValue.a = value.a.unsignedCharValue; + cppValue.b = value.b.boolValue; + cppValue.c = static_cast>(value.c.unsignedCharValue); + cppValue.d = [self asByteSpan:value.d]; + cppValue.e = [self asCharSpan:value.e]; + cppValue.f = static_cast>(value.f.unsignedCharValue); + cppValue.g = value.g.floatValue; + cppValue.h = value.h.doubleValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45334,72 +63583,76 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt32sAttributeCallbackSubscriptionBridge( + new CHIPTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt32sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStructAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int32s::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterStructAttrStructAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt40sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45415,9 +63668,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.longLongValue; + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45425,46 +63678,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt40sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int40s::TypeInfo; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -45474,23 +63730,24 @@ new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt48sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45506,9 +63763,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.longLongValue; + cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45516,46 +63773,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64sAttributeCallbackSubscriptionBridge( + new CHIPInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt48sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int48s::TypeInfo; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -45565,23 +63825,25 @@ new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt56sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45597,9 +63859,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.longLongValue; + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45607,46 +63869,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64sAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt56sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int56s::TypeInfo; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -45656,23 +63921,25 @@ new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt64sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeInt64sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45688,9 +63955,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.longLongValue; + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45698,46 +63965,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64sAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeInt64sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Int64s::TypeInfo; + using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -45747,23 +64017,25 @@ new CHIPInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeEnum8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeListLongOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterListLongOctetStringListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEnum8WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45779,9 +64051,30 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[NSData class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSData *) value[i_0]; + listHolder_0->mList[i_0] = [self asByteSpan:element_0]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45789,72 +64082,79 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEnum8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeListLongOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Enum8::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterListLongOctetStringListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeListFabricScopedWithParams:(CHIPReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterListFabricScopedListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + }); } -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEnum16WithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45870,9 +64170,86 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPTestClusterClusterTestFabricScoped class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (CHIPTestClusterClusterTestFabricScoped *) value[i_0]; + listHolder_0->mList[i_0].fabricSensitiveInt8u = element_0.fabricSensitiveInt8u.unsignedCharValue; + if (element_0.optionalFabricSensitiveInt8u != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].optionalFabricSensitiveInt8u.Emplace(); + definedValue_2 = element_0.optionalFabricSensitiveInt8u.unsignedCharValue; + } + if (element_0.nullableFabricSensitiveInt8u == nil) { + listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNonNull(); + nonNullValue_2 = element_0.nullableFabricSensitiveInt8u.unsignedCharValue; + } + if (element_0.nullableOptionalFabricSensitiveInt8u != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalFabricSensitiveInt8u.Emplace(); + if (element_0.nullableOptionalFabricSensitiveInt8u == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = element_0.nullableOptionalFabricSensitiveInt8u.unsignedCharValue; + } + } + listHolder_0->mList[i_0].fabricSensitiveCharString = [self asCharSpan:element_0.fabricSensitiveCharString]; + listHolder_0->mList[i_0].fabricSensitiveStruct.a = element_0.fabricSensitiveStruct.a.unsignedCharValue; + listHolder_0->mList[i_0].fabricSensitiveStruct.b = element_0.fabricSensitiveStruct.b.boolValue; + listHolder_0->mList[i_0].fabricSensitiveStruct.c + = static_castmList[i_0].fabricSensitiveStruct.c)>>( + element_0.fabricSensitiveStruct.c.unsignedCharValue); + listHolder_0->mList[i_0].fabricSensitiveStruct.d = [self asByteSpan:element_0.fabricSensitiveStruct.d]; + listHolder_0->mList[i_0].fabricSensitiveStruct.e = [self asCharSpan:element_0.fabricSensitiveStruct.e]; + listHolder_0->mList[i_0].fabricSensitiveStruct.f + = static_castmList[i_0].fabricSensitiveStruct.f)>>( + element_0.fabricSensitiveStruct.f.unsignedCharValue); + listHolder_0->mList[i_0].fabricSensitiveStruct.g = element_0.fabricSensitiveStruct.g.floatValue; + listHolder_0->mList[i_0].fabricSensitiveStruct.h = element_0.fabricSensitiveStruct.h.doubleValue; + { + using ListType_2 = std::remove_reference_tmList[i_0].fabricSensitiveInt8uList)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.fabricSensitiveInt8uList.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.fabricSensitiveInt8uList.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.fabricSensitiveInt8uList.count; ++i_2) { + if (![element_0.fabricSensitiveInt8uList[i_2] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_2 = (NSNumber *) element_0.fabricSensitiveInt8uList[i_2]; + listHolder_2->mList[i_2] = element_2.unsignedCharValue; + } + listHolder_0->mList[i_0].fabricSensitiveInt8uList + = ListType_2(listHolder_2->mList, element_0.fabricSensitiveInt8uList.count); + } else { + listHolder_0->mList[i_0].fabricSensitiveInt8uList = ListType_2(); + } + } + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45880,73 +64257,76 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEnum16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeListFabricScopedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Enum16::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterListFabricScopedListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeFloatSingleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPFloatAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -45962,9 +64342,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.floatValue; + cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -45972,47 +64352,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPFloatAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFloatSingleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTimedWriteBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::FloatSingle::TypeInfo; + using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -46022,24 +64403,24 @@ new CHIPFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeFloatDoubleWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneralErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPDoubleAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -46055,9 +64436,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.doubleValue; + cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -46065,47 +64446,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPDoubleAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeFloatDoubleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneralErrorBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::FloatDouble::TypeInfo; + using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -46115,25 +64498,24 @@ new CHIPDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeOctetStringWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPOctetStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOctetStringWithValue:(NSData * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -46149,9 +64531,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asByteSpan:value]; + cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -46159,46 +64541,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOctetStringAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterErrorBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::OctetString::TypeInfo; + using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -46208,25 +64593,24 @@ new CHIPOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelabl }); } -- (void)readAttributeListInt8uWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterListInt8uListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListInt8uWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -46242,30 +64626,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) value[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } + cppValue = value.boolValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -46273,73 +64636,73 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterListInt8uListAttributeCallbackSubscriptionBridge( + new CHIPBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterListInt8uListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeListInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnsupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterListInt8uListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListInt8u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeListOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, +- (void)readAttributeNullableBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterListOctetStringListAttributeCallbackBridge( + new CHIPNullableBooleanAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler { @@ -46357,29 +64720,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSData *) value[i_0]; - listHolder_0->mList[i_0] = [self asByteSpan:element_0]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.boolValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -46388,77 +64735,76 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterListOctetStringListAttributeCallbackSubscriptionBridge( + new CHIPNullableBooleanAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterListOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeListOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeNullableBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterListOctetStringListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeListStructOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterListStructOctetStringListAttributeCallbackBridge( + new CHIPTestClusterNullableBitmap8AttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -46474,30 +64820,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[CHIPTestClusterClusterTestListStructOctet class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (CHIPTestClusterClusterTestListStructOctet *) value[i_0]; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedLongLongValue; - listHolder_0->mList[i_0].operationalCert = [self asByteSpan:element_0.operationalCert]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -46506,50 +64835,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListStructOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge( + new CHIPTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterListStructOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeListStructOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableBitmap8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterListStructOctetStringListAttributeCallbackBridge( + new CHIPTestClusterNullableBitmap8AttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListStructOctetString::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -46559,25 +64887,25 @@ new CHIPTestClusterListStructOctetStringListAttributeCallbackBridge( }); } -- (void)readAttributeLongOctetStringWithCompletionHandler:(void (^)( - NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPOctetStringAttributeCallbackBridge( + new CHIPTestClusterNullableBitmap16AttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLongOctetStringWithValue:(NSData * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -46593,9 +64921,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asByteSpan:value]; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedShortValue); + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -46603,75 +64936,77 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPOctetStringAttributeCallbackSubscriptionBridge( + new CHIPTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLongOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableBitmap16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::LongOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterNullableBitmap16AttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCharStringWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableBitmap32WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterNullableBitmap32AttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeCharStringWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -46687,9 +65022,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedIntValue); + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -46697,73 +65037,77 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableBitmap32WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::CharString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterNullableBitmap32AttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeLongCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableBitmap64WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterNullableBitmap64AttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeLongCharStringWithValue:(NSString * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -46779,9 +65123,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedLongLongValue); + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -46789,74 +65138,77 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeLongCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPCharStringAttributeCallbackSubscriptionBridge( + new CHIPTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLongCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableBitmap64WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::LongCharString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterNullableBitmap64AttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeEpochUsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt8uWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEpochUsWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -46872,9 +65224,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -46882,46 +65239,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEpochUsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEpochUsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::EpochUs::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -46931,23 +65290,25 @@ new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeEpochSWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEpochSWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -46963,9 +65324,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -46973,46 +65339,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEpochSWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEpochSWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::EpochS::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47022,24 +65390,25 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeVendorIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPVendorIdAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt32uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeVendorIdWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -47055,9 +65424,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedShortValue); + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -47065,46 +65439,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPVendorIdAttributeCallbackSubscriptionBridge( + new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPVendorIdAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeVendorIdWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt24uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::VendorId::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47114,28 +65490,25 @@ new CHIPVendorIdAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeListNullablesAndOptionalsStructWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( + new CHIPNullableInt32uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -47151,201 +65524,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[CHIPTestClusterClusterNullablesAndOptionalsStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (CHIPTestClusterClusterNullablesAndOptionalsStruct *) value[i_0]; - if (element_0.nullableInt == nil) { - listHolder_0->mList[i_0].nullableInt.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableInt.SetNonNull(); - nonNullValue_2 = element_0.nullableInt.unsignedShortValue; - } - if (element_0.optionalInt != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalInt.Emplace(); - definedValue_2 = element_0.optionalInt.unsignedShortValue; - } - if (element_0.nullableOptionalInt != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalInt.Emplace(); - if (element_0.nullableOptionalInt == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = element_0.nullableOptionalInt.unsignedShortValue; - } - } - if (element_0.nullableString == nil) { - listHolder_0->mList[i_0].nullableString.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableString.SetNonNull(); - nonNullValue_2 = [self asCharSpan:element_0.nullableString]; - } - if (element_0.optionalString != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalString.Emplace(); - definedValue_2 = [self asCharSpan:element_0.optionalString]; - } - if (element_0.nullableOptionalString != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalString.Emplace(); - if (element_0.nullableOptionalString == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = [self asCharSpan:element_0.nullableOptionalString]; - } - } - if (element_0.nullableStruct == nil) { - listHolder_0->mList[i_0].nullableStruct.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableStruct.SetNonNull(); - nonNullValue_2.a = element_0.nullableStruct.a.unsignedCharValue; - nonNullValue_2.b = element_0.nullableStruct.b.boolValue; - nonNullValue_2.c = static_cast>( - element_0.nullableStruct.c.unsignedCharValue); - nonNullValue_2.d = [self asByteSpan:element_0.nullableStruct.d]; - nonNullValue_2.e = [self asCharSpan:element_0.nullableStruct.e]; - nonNullValue_2.f = static_cast>( - element_0.nullableStruct.f.unsignedCharValue); - nonNullValue_2.g = element_0.nullableStruct.g.floatValue; - nonNullValue_2.h = element_0.nullableStruct.h.doubleValue; - } - if (element_0.optionalStruct != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalStruct.Emplace(); - definedValue_2.a = element_0.optionalStruct.a.unsignedCharValue; - definedValue_2.b = element_0.optionalStruct.b.boolValue; - definedValue_2.c = static_cast>( - element_0.optionalStruct.c.unsignedCharValue); - definedValue_2.d = [self asByteSpan:element_0.optionalStruct.d]; - definedValue_2.e = [self asCharSpan:element_0.optionalStruct.e]; - definedValue_2.f = static_cast>( - element_0.optionalStruct.f.unsignedCharValue); - definedValue_2.g = element_0.optionalStruct.g.floatValue; - definedValue_2.h = element_0.optionalStruct.h.doubleValue; - } - if (element_0.nullableOptionalStruct != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalStruct.Emplace(); - if (element_0.nullableOptionalStruct == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3.a = element_0.nullableOptionalStruct.a.unsignedCharValue; - nonNullValue_3.b = element_0.nullableOptionalStruct.b.boolValue; - nonNullValue_3.c = static_cast>( - element_0.nullableOptionalStruct.c.unsignedCharValue); - nonNullValue_3.d = [self asByteSpan:element_0.nullableOptionalStruct.d]; - nonNullValue_3.e = [self asCharSpan:element_0.nullableOptionalStruct.e]; - nonNullValue_3.f = static_cast>( - element_0.nullableOptionalStruct.f.unsignedCharValue); - nonNullValue_3.g = element_0.nullableOptionalStruct.g.floatValue; - nonNullValue_3.h = element_0.nullableOptionalStruct.h.doubleValue; - } - } - if (element_0.nullableList == nil) { - listHolder_0->mList[i_0].nullableList.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableList.SetNonNull(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (element_0.nullableList.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.nullableList.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < element_0.nullableList.count; ++i_3) { - if (![element_0.nullableList[i_3] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_3 = (NSNumber *) element_0.nullableList[i_3]; - listHolder_3->mList[i_3] - = static_castmList[i_3])>>( - element_3.unsignedCharValue); - } - nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.nullableList.count); - } else { - nonNullValue_2 = ListType_3(); - } - } - } - if (element_0.optionalList != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalList.Emplace(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (element_0.optionalList.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.optionalList.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < element_0.optionalList.count; ++i_3) { - if (![element_0.optionalList[i_3] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_3 = (NSNumber *) element_0.optionalList[i_3]; - listHolder_3->mList[i_3] - = static_castmList[i_3])>>( - element_3.unsignedCharValue); - } - definedValue_2 = ListType_3(listHolder_3->mList, element_0.optionalList.count); - } else { - definedValue_2 = ListType_3(); - } - } - } - if (element_0.nullableOptionalList != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalList.Emplace(); - if (element_0.nullableOptionalList == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - { - using ListType_4 = std::remove_reference_t; - using ListMemberType_4 = ListMemberTypeGetter::Type; - if (element_0.nullableOptionalList.count != 0) { - auto * listHolder_4 - = new ListHolder(element_0.nullableOptionalList.count); - if (listHolder_4 == nullptr || listHolder_4->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_4); - for (size_t i_4 = 0; i_4 < element_0.nullableOptionalList.count; ++i_4) { - if (![element_0.nullableOptionalList[i_4] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_4 = (NSNumber *) element_0.nullableOptionalList[i_4]; - listHolder_4->mList[i_4] - = static_castmList[i_4])>>( - element_4.unsignedCharValue); - } - nonNullValue_3 = ListType_4(listHolder_4->mList, element_0.nullableOptionalList.count); - } else { - nonNullValue_3 = ListType_4(); - } - } - } - } - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -47354,78 +65539,76 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListNullablesAndOptionalsStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge( + new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterListNullablesAndOptionalsStructListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeListNullablesAndOptionalsStructWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt32uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterListNullablesAndOptionalsStructListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListNullablesAndOptionalsStruct::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeEnumAttrWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterClusterSimpleEnumAttributeCallbackBridge( + new CHIPNullableInt64uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -47441,9 +65624,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -47451,78 +65639,76 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeEnumAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt40uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterClusterSimpleEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::EnumAttr::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeStructAttrWithCompletionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterStructAttrStructAttributeCallbackBridge( + new CHIPNullableInt64uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeStructAttrWithValue:(CHIPTestClusterClusterSimpleStruct * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeStructAttrWithValue:(CHIPTestClusterClusterSimpleStruct * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeStructAttrWithValue:(CHIPTestClusterClusterSimpleStruct * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -47538,16 +65724,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; TypeInfo::Type cppValue; - cppValue.a = value.a.unsignedCharValue; - cppValue.b = value.b.boolValue; - cppValue.c = static_cast>(value.c.unsignedCharValue); - cppValue.d = [self asByteSpan:value.d]; - cppValue.e = [self asCharSpan:value.e]; - cppValue.f = static_cast>(value.f.unsignedCharValue); - cppValue.g = value.g.floatValue; - cppValue.h = value.h.doubleValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -47555,76 +65739,76 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeStructAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterStructAttrStructAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterStructAttrStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeStructAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt48uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterStructAttrStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::StructAttr::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); +- (void)readAttributeNullableInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPNullableInt64uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -47640,9 +65824,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -47650,49 +65839,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRangeRestrictedInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt56uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47702,24 +65890,25 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt64uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -47735,9 +65924,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.charValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -47745,49 +65939,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRangeRestrictedInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt64uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt8s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47797,25 +65990,25 @@ new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt8sWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt8sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -47831,9 +66024,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.charValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -47841,49 +66039,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRangeRestrictedInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47893,25 +66090,25 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt16sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -47927,9 +66124,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.shortValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -47937,49 +66139,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeRangeRestrictedInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::RangeRestrictedInt16s::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -47989,25 +66190,25 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeListLongOctetStringWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterListLongOctetStringListAttributeCallbackBridge( + new CHIPNullableInt32sAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -48023,29 +66224,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[NSData class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSData *) value[i_0]; - listHolder_0->mList[i_0] = [self asByteSpan:element_0]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.intValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -48054,173 +66239,98 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListLongOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge( + new CHIPNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterListLongOctetStringListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeListLongOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt24sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterListLongOctetStringListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListLongOctetString::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeListFabricScopedWithParams:(CHIPReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterListFabricScopedListAttributeCallbackBridge( + new CHIPNullableInt32sAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue]); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } - -- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[CHIPTestClusterClusterTestFabricScoped class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (CHIPTestClusterClusterTestFabricScoped *) value[i_0]; - listHolder_0->mList[i_0].fabricSensitiveInt8u = element_0.fabricSensitiveInt8u.unsignedCharValue; - if (element_0.optionalFabricSensitiveInt8u != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].optionalFabricSensitiveInt8u.Emplace(); - definedValue_2 = element_0.optionalFabricSensitiveInt8u.unsignedCharValue; - } - if (element_0.nullableFabricSensitiveInt8u == nil) { - listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].nullableFabricSensitiveInt8u.SetNonNull(); - nonNullValue_2 = element_0.nullableFabricSensitiveInt8u.unsignedCharValue; - } - if (element_0.nullableOptionalFabricSensitiveInt8u != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nullableOptionalFabricSensitiveInt8u.Emplace(); - if (element_0.nullableOptionalFabricSensitiveInt8u == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = element_0.nullableOptionalFabricSensitiveInt8u.unsignedCharValue; - } - } - listHolder_0->mList[i_0].fabricSensitiveCharString = [self asCharSpan:element_0.fabricSensitiveCharString]; - listHolder_0->mList[i_0].fabricSensitiveStruct.a = element_0.fabricSensitiveStruct.a.unsignedCharValue; - listHolder_0->mList[i_0].fabricSensitiveStruct.b = element_0.fabricSensitiveStruct.b.boolValue; - listHolder_0->mList[i_0].fabricSensitiveStruct.c - = static_castmList[i_0].fabricSensitiveStruct.c)>>( - element_0.fabricSensitiveStruct.c.unsignedCharValue); - listHolder_0->mList[i_0].fabricSensitiveStruct.d = [self asByteSpan:element_0.fabricSensitiveStruct.d]; - listHolder_0->mList[i_0].fabricSensitiveStruct.e = [self asCharSpan:element_0.fabricSensitiveStruct.e]; - listHolder_0->mList[i_0].fabricSensitiveStruct.f - = static_castmList[i_0].fabricSensitiveStruct.f)>>( - element_0.fabricSensitiveStruct.f.unsignedCharValue); - listHolder_0->mList[i_0].fabricSensitiveStruct.g = element_0.fabricSensitiveStruct.g.floatValue; - listHolder_0->mList[i_0].fabricSensitiveStruct.h = element_0.fabricSensitiveStruct.h.doubleValue; - { - using ListType_2 = std::remove_reference_tmList[i_0].fabricSensitiveInt8uList)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.fabricSensitiveInt8uList.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.fabricSensitiveInt8uList.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.fabricSensitiveInt8uList.count; ++i_2) { - if (![element_0.fabricSensitiveInt8uList[i_2] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (NSNumber *) element_0.fabricSensitiveInt8uList[i_2]; - listHolder_2->mList[i_2] = element_2.unsignedCharValue; - } - listHolder_0->mList[i_0].fabricSensitiveInt8uList - = ListType_2(listHolder_2->mList, element_0.fabricSensitiveInt8uList.count); - } else { - listHolder_0->mList[i_0].fabricSensitiveInt8uList = ListType_2(); - } - } - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } + +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.intValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -48229,76 +66339,76 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeListFabricScopedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge( + new CHIPNullableInt32sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeListFabricScopedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt32sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterListFabricScopedListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ListFabricScoped::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeTimedWriteBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt64sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -48314,9 +66424,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.boolValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -48324,48 +66439,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeTimedWriteBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeTimedWriteBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt40sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::TimedWriteBoolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48375,24 +66490,25 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeGeneralErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt64sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -48408,9 +66524,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.boolValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -48418,49 +66539,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeGeneralErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneralErrorBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt48sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::GeneralErrorBoolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48470,24 +66590,25 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeClusterErrorBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt64sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -48503,9 +66624,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.boolValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -48513,49 +66639,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeClusterErrorBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterErrorBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt56sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ClusterErrorBoolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48565,24 +66690,25 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeUnsupportedWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt64sAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -48598,9 +66724,14 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.boolValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.longLongValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -48608,47 +66739,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeUnsupportedWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPBooleanAttributeCallbackSubscriptionBridge( + new CHIPNullableInt64sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeUnsupportedWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableInt64sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::Unsupported::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48658,25 +66790,25 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * }); } -- (void)readAttributeNullableBooleanWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableEnum8WithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableBooleanAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -48692,13 +66824,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.boolValue; + nonNullValue_0 = value.unsignedCharValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -48707,48 +66839,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBooleanWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableBooleanAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableBooleanAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableBooleanWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableEnum8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBoolean::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -48758,25 +66890,25 @@ new CHIPNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cance }); } -- (void)readAttributeNullableBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterNullableBitmap8AttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -48792,13 +66924,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); + nonNullValue_0 = value.unsignedShortValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -48807,77 +66939,76 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableBitmap8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableEnum16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterNullableBitmap8AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableFloatSingleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterNullableBitmap16AttributeCallbackBridge( + new CHIPNullableFloatAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -48893,13 +67024,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedShortValue); + nonNullValue_0 = value.floatValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -48908,77 +67039,77 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( + new CHIPNullableFloatAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableBitmap16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableFloatSingleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterNullableBitmap16AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPNullableFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableBitmap32WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableFloatDoubleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterNullableBitmap32AttributeCallbackBridge( + new CHIPNullableDoubleAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -48994,13 +67125,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedIntValue); + nonNullValue_0 = value.doubleValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -49009,77 +67140,77 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( + new CHIPNullableDoubleAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableBitmap32WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableFloatDoubleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterNullableBitmap32AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPNullableDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableBitmap64WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterNullableBitmap64AttributeCallbackBridge( + new CHIPNullableOctetStringAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableOctetStringWithValue:(NSData * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -49095,13 +67226,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedLongLongValue); + nonNullValue_0 = [self asByteSpan:value]; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -49110,77 +67241,77 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( + new CHIPNullableOctetStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableBitmap64WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterNullableBitmap64AttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableInt8uWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNullableCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge( + new CHIPNullableCharStringAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableCharStringWithValue:(NSString * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -49196,13 +67327,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; + nonNullValue_0 = [self asCharSpan:value]; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -49211,48 +67342,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPNullableCharStringAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt8u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49262,25 +67393,25 @@ new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeNullableInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableEnumAttrWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( + new CHIPNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -49296,13 +67427,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; + nonNullValue_0 = static_cast>(value.unsignedCharValue); } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -49311,74 +67442,78 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableEnumAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt16u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableInt24uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeNullableStructWithCompletionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge( + new CHIPTestClusterNullableStructStructAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableStructWithValue:(CHIPTestClusterClusterSimpleStruct * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableStructWithValue:(CHIPTestClusterClusterSimpleStruct * _Nullable) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value +- (void)writeAttributeNullableStructWithValue:(CHIPTestClusterClusterSimpleStruct * _Nullable)value params:(CHIPWriteParams * _Nullable)params completionHandler:(StatusCompletion)completionHandler { @@ -49396,13 +67531,20 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; + nonNullValue_0.a = value.a.unsignedCharValue; + nonNullValue_0.b = value.b.boolValue; + nonNullValue_0.c = static_cast>(value.c.unsignedCharValue); + nonNullValue_0.d = [self asByteSpan:value.d]; + nonNullValue_0.e = [self asCharSpan:value.e]; + nonNullValue_0.f = static_cast>(value.f.unsignedCharValue); + nonNullValue_0.g = value.g.floatValue; + nonNullValue_0.h = value.h.doubleValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -49411,76 +67553,80 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt24uWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt24uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeNullableStructWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + completionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt24u::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterNullableStructStructAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - -- (void)readAttributeNullableInt32uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + +- (void)readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge( + new CHIPNullableInt8uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -49496,13 +67642,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; + nonNullValue_0 = value.unsignedCharValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -49511,48 +67657,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt32uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt32uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt32u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49562,25 +67709,28 @@ new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt40uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge( + new CHIPNullableInt8sAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -49596,13 +67746,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; + nonNullValue_0 = value.charValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -49611,48 +67761,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt40uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt40uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt40u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49662,25 +67813,28 @@ new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt48uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge( + new CHIPNullableInt16uAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -49696,13 +67850,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; + nonNullValue_0 = value.unsignedShortValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -49711,48 +67865,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt48uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt48uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt48u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49762,25 +67917,28 @@ new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt56uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge( + new CHIPNullableInt16sAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -49796,13 +67954,13 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; + nonNullValue_0 = value.shortValue; } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -49811,48 +67969,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableInt56uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt56uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt56u::TypeInfo; + using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49862,97 +68021,312 @@ new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt64uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge( + new CHIPTestClusterGeneratedCommandListListAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + new CHIPTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } + new CHIPTestClusterGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPTestClusterAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTestClusterAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTestClusterAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTestClusterAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTestClusterAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; }); } -- (void)subscribeAttributeNullableInt64uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt64uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt64u::TypeInfo; + using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -49962,97 +68336,229 @@ new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt8sWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation CHIPThermostat + +- (chip::Controller::ClusterBase *)getCluster { - new CHIPNullableInt8sAttributeCallbackBridge( + return &_cppCluster; +} + +- (void)setpointRaiseLowerWithParams:(CHIPThermostatClusterSetpointRaiseLowerParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Thermostat::Commands::SetpointRaiseLower::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.mode = static_cast>(params.mode.unsignedCharValue); + request.amount = params.amount.charValue; + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)setWeeklyScheduleWithParams:(CHIPThermostatClusterSetWeeklyScheduleParams *)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Thermostat::Commands::SetWeeklySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; + request.dayOfWeekForSequence = static_cast>( + params.dayOfWeekForSequence.unsignedCharValue); + request.modeForSequence + = static_cast>(params.modeForSequence.unsignedCharValue); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.payload.count != 0) { + auto * listHolder_0 = new ListHolder(params.payload.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.payload.count; ++i_0) { + if (![params.payload[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return; + } + auto element_0 = (NSNumber *) params.payload[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedCharValue; + } + request.payload = ListType_0(listHolder_0->mList, params.payload.count); + } else { + request.payload = ListType_0(); + } + } + + new CHIPCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)getWeeklyScheduleWithParams:(CHIPThermostatClusterGetWeeklyScheduleParams *)params + completionHandler:(void (^)(CHIPThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Thermostat::Commands::GetWeeklySchedule::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + request.daysToReturn + = static_cast>(params.daysToReturn.unsignedCharValue); + request.modeToReturn + = static_cast>(params.modeToReturn.unsignedCharValue); + + new CHIPThermostatClusterGetWeeklyScheduleResponseCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)clearWeeklyScheduleWithCompletionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self clearWeeklyScheduleWithParams:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)clearWeeklyScheduleWithParams:(CHIPThermostatClusterClearWeeklyScheduleParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - chip::Optional timedWriteTimeoutMs; + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Thermostat::Commands::ClearWeeklySchedule::Type request; if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - new CHIPDefaultSuccessCallbackBridge( + new CHIPCommandSuccessCallbackBridge( self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { + ^(id _Nullable value, NSError * _Nullable error) { completionHandler(error); }, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.charValue; - } - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); }); } -- (void)subscribeAttributeNullableInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)getRelayStatusLogWithCompletionHandler:(void (^)(CHIPThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt8sAttributeCallbackSubscriptionBridge( + [self getRelayStatusLogWithParams:nil completionHandler:completionHandler]; +} +- (void)getRelayStatusLogWithParams:(CHIPThermostatClusterGetRelayStatusLogParams * _Nullable)params + completionHandler:(void (^)(CHIPThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + chip::Optional timedInvokeTimeoutMs; + ListFreer listFreer; + Thermostat::Commands::GetRelayStatusLog::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + } + + new CHIPThermostatClusterGetRelayStatusLogResponseCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.InvokeCommand( + request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); + }); +} + +- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocalTemperatureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt8s::TypeInfo; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50062,97 +68568,59 @@ new CHIPNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeNullableInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNullableInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOutdoorTemperatureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt16s::TypeInfo; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50162,97 +68630,57 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt24sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt32sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.intValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNullableInt24sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt32sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt24sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupancyWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt24s::TypeInfo; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50262,97 +68690,60 @@ new CHIPNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt32sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt32sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.intValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNullableInt32sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt32sAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt32sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt32s::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50362,97 +68753,60 @@ new CHIPNullableInt32sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt40sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt64sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNullableInt40sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt64sAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt40sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt40s::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50462,97 +68816,60 @@ new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt48sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt64sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNullableInt48sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt64sAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt48sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt48s::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50562,97 +68879,60 @@ new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt56sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt64sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNullableInt56sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt64sAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt56sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt56s::TypeInfo; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50662,97 +68942,59 @@ new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableInt64sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt64sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributePiCoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.longLongValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::PiCoolingDemand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNullableInt64sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePiCoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt64sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::PiCoolingDemand::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableInt64sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePiCoolingDemandWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableInt64s::TypeInfo; + using TypeInfo = Thermostat::Attributes::PiCoolingDemand::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50762,97 +69004,59 @@ new CHIPNullableInt64sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableEnum8WithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); -} - -- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler -{ - [self writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; -} -- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributePiHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); - } - } - - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::PiHeatingDemand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNullableEnum8WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePiHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::PiHeatingDemand::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableEnum8WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePiHeatingDemandWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableEnum8::TypeInfo; + using TypeInfo = Thermostat::Attributes::PiHeatingDemand::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50862,25 +69066,27 @@ new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeNullableEnum16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeHvacSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::HvacSystemTypeConfiguration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeHvacSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeHvacSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeHvacSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -50896,14 +69102,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + using TypeInfo = Thermostat::Attributes::HvacSystemTypeConfiguration::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -50911,48 +69112,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableEnum16WithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHvacSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::HvacSystemTypeConfiguration::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableEnum16WithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHvacSystemTypeConfigurationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableEnum16::TypeInfo; + using TypeInfo = Thermostat::Attributes::HvacSystemTypeConfiguration::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -50962,25 +69164,27 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableFloatSingleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableFloatAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -50996,14 +69200,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.floatValue; - } + cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -51011,49 +69210,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableFloatSingleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableFloatAttributeCallbackSubscriptionBridge( + new CHIPInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableFloatAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableFloatSingleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableFloatSingle::TypeInfo; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -51063,25 +69262,27 @@ new CHIPNullableFloatAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeNullableFloatDoubleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableDoubleAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -51097,14 +69298,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.doubleValue; - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -51112,49 +69308,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableFloatDoubleWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableDoubleAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableDoubleAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableFloatDoubleWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableFloatDouble::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -51164,25 +69360,27 @@ new CHIPNullableDoubleAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableOctetStringWithCompletionHandler:(void (^)(NSData * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableOctetStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableOctetStringWithValue:(NSData * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -51198,14 +69396,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asByteSpan:value]; - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -51213,49 +69406,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableOctetStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableOctetStringAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableOctetStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableOctetStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableOctetString::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -51265,25 +69458,27 @@ new CHIPNullableOctetStringAttributeCallbackBridge(queue, completionHandler, ^(C }); } -- (void)readAttributeNullableCharStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableCharStringAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableCharStringWithValue:(NSString * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -51299,14 +69494,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = [self asCharSpan:value]; - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -51314,48 +69504,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableCharStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableCharStringAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableCharStringAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableCharStringWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableCharStringAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableCharString::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -51365,25 +69556,27 @@ new CHIPNullableCharStringAttributeCallbackBridge(queue, completionHandler, ^(Ca }); } -- (void)readAttributeNullableEnumAttrWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable) value params:nil completionHandler:completionHandler]; + [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -51399,14 +69592,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -51414,80 +69602,76 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableEnumAttrWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableTestClusterClusterSimpleEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableEnumAttrWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableTestClusterClusterSimpleEnumAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableEnumAttr::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNullableStructWithCompletionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterNullableStructStructAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableStructWithValue:(CHIPTestClusterClusterSimpleStruct * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableStructWithValue:(CHIPTestClusterClusterSimpleStruct * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableStructWithValue:(CHIPTestClusterClusterSimpleStruct * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -51503,21 +69687,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.a = value.a.unsignedCharValue; - nonNullValue_0.b = value.b.boolValue; - nonNullValue_0.c = static_cast>(value.c.unsignedCharValue); - nonNullValue_0.d = [self asByteSpan:value.d]; - nonNullValue_0.e = [self asCharSpan:value.e]; - nonNullValue_0.f = static_cast>(value.f.unsignedCharValue); - nonNullValue_0.g = value.g.floatValue; - nonNullValue_0.h = value.h.doubleValue; - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -51525,80 +69697,76 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableStructWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterNullableStructStructAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterNullableStructStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableStructWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(CHIPTestClusterClusterSimpleStruct * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterNullableStructStructAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableStruct::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeNullableRangeRestrictedInt8uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - new CHIPNullableInt8uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -51614,14 +69782,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -51629,49 +69792,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt8uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableRangeRestrictedInt8uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8u::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -51681,28 +69844,24 @@ new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeNullableRangeRestrictedInt8sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt8sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -51718,14 +69877,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.charValue; - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -51733,49 +69887,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt8sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt8sAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableRangeRestrictedInt8sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt8s::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -51785,28 +69939,24 @@ new CHIPNullableInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancela }); } -- (void)readAttributeNullableRangeRestrictedInt16uWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -51822,14 +69972,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } + cppValue = value.shortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -51837,49 +69982,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt16uWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableRangeRestrictedInt16uWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16u::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -51889,28 +70034,24 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeNullableRangeRestrictedInt16sWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -51926,14 +70067,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.shortValue; - } + cppValue = value.charValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -51941,49 +70077,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeNullableRangeRestrictedInt16sWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt8sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNullableRangeRestrictedInt16sWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableRangeRestrictedInt16s::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -51993,190 +70129,191 @@ new CHIPNullableInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterGeneratedCommandListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRemoteSensingWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPTestClusterGeneratedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::GeneratedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterAcceptedCommandListListAttributeCallbackBridge( + new CHIPThermostatClusterThermostatControlSequenceAttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - new CHIPTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge( - self.callbackQueue, reportHandler, - ^(Cancelable * success, Cancelable * failure) { - if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { - // We don't support disabling auto-resubscribe. - return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, - params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], - params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); - }, - subscriptionEstablishedHandler); + [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } - -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { - new CHIPTestClusterAcceptedCommandListListAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::AcceptedCommandList::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - new CHIPTestClusterAttributeListListAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPTestClusterAttributeListListAttributeCallbackSubscriptionBridge( + new CHIPThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; - } - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; - auto successFn = Callback::FromCancelable(success); + } + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPTestClusterAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPTestClusterAttributeListListAttributeCallbackBridge( + new CHIPThermostatClusterThermostatControlSequenceAttributeCallbackBridge( queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::AttributeList::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -52186,59 +70323,89 @@ new CHIPTestClusterAttributeListListAttributeCallbackBridge( }); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSystemModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -52248,229 +70415,120 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -@end - -@implementation CHIPThermostat - -- (chip::Controller::ClusterBase *)getCluster +- (void)readAttributeAlarmMaskWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return &_cppCluster; + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AlarmMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)clearWeeklyScheduleWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self clearWeeklyScheduleWithParams:nil completionHandler:completionHandler]; -} -- (void)clearWeeklyScheduleWithParams:(CHIPThermostatClusterClearWeeklyScheduleParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeAlarmMaskWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Thermostat::Commands::ClearWeeklySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)getRelayStatusLogWithCompletionHandler:(void (^)(CHIPThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self getRelayStatusLogWithParams:nil completionHandler:completionHandler]; -} -- (void)getRelayStatusLogWithParams:(CHIPThermostatClusterGetRelayStatusLogParams * _Nullable)params - completionHandler:(void (^)(CHIPThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Thermostat::Commands::GetRelayStatusLog::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - - new CHIPThermostatClusterGetRelayStatusLogResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)getWeeklyScheduleWithParams:(CHIPThermostatClusterGetWeeklyScheduleParams *)params - completionHandler:(void (^)(CHIPThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Thermostat::Commands::GetWeeklySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.daysToReturn - = static_cast>(params.daysToReturn.unsignedCharValue); - request.modeToReturn - = static_cast>(params.modeToReturn.unsignedCharValue); - - new CHIPThermostatClusterGetWeeklyScheduleResponseCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); -} - -- (void)setWeeklyScheduleWithParams:(CHIPThermostatClusterSetWeeklyScheduleParams *)params - completionHandler:(StatusCompletion)completionHandler -{ - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Thermostat::Commands::SetWeeklySchedule::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - } - request.numberOfTransitionsForSequence = params.numberOfTransitionsForSequence.unsignedCharValue; - request.dayOfWeekForSequence = static_cast>( - params.dayOfWeekForSequence.unsignedCharValue); - request.modeForSequence - = static_cast>(params.modeForSequence.unsignedCharValue); - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.payload.count != 0) { - auto * listHolder_0 = new ListHolder(params.payload.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.payload.count; ++i_0) { - if (![params.payload[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return; - } - auto element_0 = (NSNumber *) params.payload[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedCharValue; + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; } - request.payload = ListType_0(listHolder_0->mList, params.payload.count); - } else { - request.payload = ListType_0(); - } - } - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AlarmMask::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)setpointRaiseLowerWithParams:(CHIPThermostatClusterSetpointRaiseLowerParams *)params - completionHandler:(StatusCompletion)completionHandler ++ (void)readAttributeAlarmMaskWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedInvokeTimeoutMs; - ListFreer listFreer; - Thermostat::Commands::SetpointRaiseLower::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::AlarmMask::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } - request.mode = static_cast>(params.mode.unsignedCharValue); - request.amount = params.amount.charValue; - - new CHIPCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completionHandler(error); - }, - ^(Cancelable * success, Cancelable * failure) { - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.InvokeCommand( - request, successFn->mContext, successFn->mCall, failureFn->mCall, timedInvokeTimeoutMs); - }); + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeLocalTemperatureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeThermostatRunningModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -52480,60 +70538,58 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStartOfWeekWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -52543,60 +70599,60 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -52606,60 +70662,60 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -52669,18 +70725,53 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, +- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; +} +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: @@ -52688,41 +70779,41 @@ - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _No reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -52732,27 +70823,27 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -52768,9 +70859,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -52778,49 +70869,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -52830,27 +70921,27 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value + params:nil + completionHandler:completionHandler]; } -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -52866,9 +70957,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -52876,49 +70967,49 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -52928,50 +71019,144 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + ++ (void)readAttributeThermostatRunningStateWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - chip::Optional timedWriteTimeoutMs; - if (params != nil) { - if (params.timedWriteTimeoutMs != nil) { - timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - } + return CHIP_ERROR_NOT_FOUND; + }); +} - new CHIPDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completionHandler(error); - }, +- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt8uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - auto successFn = Callback::FromCancelable(success); + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.WriteAttribute( - cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); - }); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval ++ (void)readAttributeSetpointChangeSourceWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(CHIPSubscribeParams * _Nullable)params subscriptionEstablished: @@ -52986,7 +71171,7 @@ new CHIPInt16sAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -52998,7 +71183,7 @@ new CHIPInt16sAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeSetpointChangeAmountWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: @@ -53007,7 +71192,7 @@ + (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheC new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -53023,24 +71208,86 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler { - [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); } -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler + ++ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AcType::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)writeAttributeAcTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeAcTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeAcTypeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -53056,9 +71303,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -53066,49 +71313,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AcType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53118,24 +71362,24 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcCapacityWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AcCapacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAcCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeAcCapacityWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAcCapacityWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -53151,9 +71395,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcCapacity::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = value.unsignedShortValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -53161,49 +71405,46 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt16uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AcCapacity::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcCapacityWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcCapacity::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53213,24 +71454,24 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AcRefrigerantType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAcRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeAcRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAcRefrigerantTypeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -53246,9 +71487,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcRefrigerantType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -53256,49 +71497,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AcRefrigerantType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcRefrigerantTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcRefrigerantType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53308,24 +71548,24 @@ new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s }); } -- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AcCompressorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAcCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeAcCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAcCompressorTypeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -53341,9 +71581,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcCompressorType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.charValue; + cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -53351,49 +71591,48 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8sAttributeCallbackSubscriptionBridge( + new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AcCompressorType::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcCompressorTypeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcCompressorType::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53403,28 +71642,24 @@ new CHIPInt8sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcErrorCodeWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPThermostatClusterThermostatControlSequenceAttributeCallbackBridge( - self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AcErrorCode::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAcErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value - params:nil - completionHandler:completionHandler]; + [self writeAttributeAcErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAcErrorCodeWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -53440,9 +71675,9 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcErrorCode::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedIntValue; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute( @@ -53450,77 +71685,74 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge( + new CHIPInt32uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AcErrorCode::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPThermostatClusterThermostatControlSequenceAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAcErrorCodeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPThermostatClusterThermostatControlSequenceAttributeCallbackBridge( - queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); - } - return err; + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::AcErrorCode::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); } - return CHIP_ERROR_NOT_FOUND; - }); + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSystemModeWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcLouverPosition::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAcLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { - [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; + [self writeAttributeAcLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; } -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value - params:(CHIPWriteParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeAcLouverPositionWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedWriteTimeoutMs; if (params != nil) { @@ -53536,7 +71768,7 @@ new CHIPDefaultSuccessCallbackBridge( }, ^(Cancelable * success, Cancelable * failure) { ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcLouverPosition::TypeInfo; TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; auto successFn = Callback::FromCancelable(success); @@ -53546,11 +71778,12 @@ new CHIPDefaultSuccessCallbackBridge( }); } -- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -53559,7 +71792,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcLouverPosition::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -53571,15 +71804,16 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeSystemModeWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcLouverPositionWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcLouverPosition::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -53595,58 +71829,59 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - auto successFn = Callback::FromCancelable(success); + new CHIPInt16sAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AcCoilTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPInt16sAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::AcCoilTemperature::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPInt16sAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeStartOfWeekWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcCoilTemperatureWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPInt16sAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcCoilTemperature::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -53656,24 +71891,55 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcCapacityFormatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcCapacityFormat::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); } -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeAcCapacityFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + [self writeAttributeAcCapacityFormatWithValue:(NSNumber * _Nonnull) value params:nil completionHandler:completionHandler]; +} +- (void)writeAttributeAcCapacityFormatWithValue:(NSNumber * _Nonnull)value + params:(CHIPWriteParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler +{ + chip::Optional timedWriteTimeoutMs; + if (params != nil) { + if (params.timedWriteTimeoutMs != nil) { + timedWriteTimeoutMs.SetValue(params.timedWriteTimeoutMs.unsignedShortValue); + } + } + + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::AcCapacityFormat::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute( + cppValue, successFn->mContext, successFn->mCall, failureFn->mCall, timedWriteTimeoutMs); + }); +} + +- (void)subscribeAttributeAcCapacityFormatWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { new CHIPInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, @@ -53682,7 +71948,7 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcCapacityFormat::TypeInfo; auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, @@ -53694,16 +71960,16 @@ new CHIPInt8uAttributeCallbackSubscriptionBridge( subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAcCapacityFormatWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcCapacityFormat::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -53719,67 +71985,134 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su }); } -- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPThermostatGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(CHIPSubscribeParams * _Nullable)params - subscriptionEstablished: - (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { // We don't support disabling auto-resubscribe. return CHIP_ERROR_INVALID_ARGUMENT; } - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - auto successFn = Callback::FromCancelable(success); + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, [minInterval unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, subscriptionEstablishedHandler); } -+ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPThermostatGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPThermostatAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPThermostatAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( @@ -54471,6 +72804,66 @@ new CHIPThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBr }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -59198,6 +77591,129 @@ new CHIPTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTimeFormatLocalizationAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPTimeFormatLocalizationAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -59365,6 +77881,136 @@ new CHIPUnitLocalizationClusterTempUnitAttributeCallbackBridge( }); } +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPUnitLocalizationGeneratedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPUnitLocalizationAcceptedCommandListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -59804,6 +78450,129 @@ new CHIPUserLabelAcceptedCommandListListAttributeCallbackBridge( }); } +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPUserLabelAttributeListListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPUserLabelAttributeListListAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeAttributeListWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPUserLabelAttributeListListAttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -60128,6 +78897,66 @@ new CHIPWakeOnLanAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt32uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeFeatureMapWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -61365,16 +80194,16 @@ @implementation CHIPWindowCovering return &_cppCluster; } -- (void)downOrCloseWithCompletionHandler:(StatusCompletion)completionHandler +- (void)upOrOpenWithCompletionHandler:(StatusCompletion)completionHandler { - [self downOrCloseWithParams:nil completionHandler:completionHandler]; + [self upOrOpenWithParams:nil completionHandler:completionHandler]; } -- (void)downOrCloseWithParams:(CHIPWindowCoveringClusterDownOrCloseParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)upOrOpenWithParams:(CHIPWindowCoveringClusterUpOrOpenParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::DownOrClose::Type request; + WindowCovering::Commands::UpOrOpen::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); @@ -61394,22 +80223,21 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)goToLiftPercentageWithParams:(CHIPWindowCoveringClusterGoToLiftPercentageParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)downOrCloseWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self downOrCloseWithParams:nil completionHandler:completionHandler]; +} +- (void)downOrCloseWithParams:(CHIPWindowCoveringClusterDownOrCloseParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::GoToLiftPercentage::Type request; + WindowCovering::Commands::DownOrClose::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.liftPercentageValue = params.liftPercentageValue.unsignedCharValue; - if (params.liftPercent100thsValue != nil) { - auto & definedValue_0 = request.liftPercent100thsValue.Emplace(); - definedValue_0 = params.liftPercent100thsValue.unsignedShortValue; - } new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -61424,18 +80252,21 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)goToLiftValueWithParams:(CHIPWindowCoveringClusterGoToLiftValueParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)stopMotionWithCompletionHandler:(StatusCompletion)completionHandler +{ + [self stopMotionWithParams:nil completionHandler:completionHandler]; +} +- (void)stopMotionWithParams:(CHIPWindowCoveringClusterStopMotionParams * _Nullable)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::GoToLiftValue::Type request; + WindowCovering::Commands::StopMotion::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.liftValue = params.liftValue.unsignedShortValue; new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -61450,22 +80281,18 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)goToTiltPercentageWithParams:(CHIPWindowCoveringClusterGoToTiltPercentageParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)goToLiftValueWithParams:(CHIPWindowCoveringClusterGoToLiftValueParams *)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::GoToTiltPercentage::Type request; + WindowCovering::Commands::GoToLiftValue::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.tiltPercentageValue = params.tiltPercentageValue.unsignedCharValue; - if (params.tiltPercent100thsValue != nil) { - auto & definedValue_0 = request.tiltPercent100thsValue.Emplace(); - definedValue_0 = params.tiltPercent100thsValue.unsignedShortValue; - } + request.liftValue = params.liftValue.unsignedShortValue; new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -61480,18 +80307,22 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)goToTiltValueWithParams:(CHIPWindowCoveringClusterGoToTiltValueParams *)params - completionHandler:(StatusCompletion)completionHandler +- (void)goToLiftPercentageWithParams:(CHIPWindowCoveringClusterGoToLiftPercentageParams *)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::GoToTiltValue::Type request; + WindowCovering::Commands::GoToLiftPercentage::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.tiltValue = params.tiltValue.unsignedShortValue; + request.liftPercentageValue = params.liftPercentageValue.unsignedCharValue; + if (params.liftPercent100thsValue != nil) { + auto & definedValue_0 = request.liftPercent100thsValue.Emplace(); + definedValue_0 = params.liftPercent100thsValue.unsignedShortValue; + } new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -61506,21 +80337,18 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)stopMotionWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self stopMotionWithParams:nil completionHandler:completionHandler]; -} -- (void)stopMotionWithParams:(CHIPWindowCoveringClusterStopMotionParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)goToTiltValueWithParams:(CHIPWindowCoveringClusterGoToTiltValueParams *)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::StopMotion::Type request; + WindowCovering::Commands::GoToTiltValue::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.tiltValue = params.tiltValue.unsignedShortValue; new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -61535,21 +80363,22 @@ new CHIPCommandSuccessCallbackBridge( }); } -- (void)upOrOpenWithCompletionHandler:(StatusCompletion)completionHandler -{ - [self upOrOpenWithParams:nil completionHandler:completionHandler]; -} -- (void)upOrOpenWithParams:(CHIPWindowCoveringClusterUpOrOpenParams * _Nullable)params - completionHandler:(StatusCompletion)completionHandler +- (void)goToTiltPercentageWithParams:(CHIPWindowCoveringClusterGoToTiltPercentageParams *)params + completionHandler:(StatusCompletion)completionHandler { chip::Optional timedInvokeTimeoutMs; ListFreer listFreer; - WindowCovering::Commands::UpOrOpen::Type request; + WindowCovering::Commands::GoToTiltPercentage::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } + request.tiltPercentageValue = params.tiltPercentageValue.unsignedCharValue; + if (params.tiltPercent100thsValue != nil) { + auto & definedValue_0 = request.tiltPercent100thsValue.Emplace(); + definedValue_0 = params.tiltPercent100thsValue.unsignedShortValue; + } new CHIPCommandSuccessCallbackBridge( self.callbackQueue, @@ -61625,6 +80454,132 @@ new CHIPWindowCoveringClusterTypeAttributeCallbackBridge( }); } +- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitLift::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::PhysicalClosedLimitTilt::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { @@ -61753,6 +80708,132 @@ new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancel }); } +- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsLift::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + +- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(CHIPSubscribeParams * _Nullable)params + subscriptionEstablished: + (SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + new CHIPInt16uAttributeCallbackSubscriptionBridge( + self.callbackQueue, reportHandler, + ^(Cancelable * success, Cancelable * failure) { + if (params != nil && params.autoResubscribe != nil && ![params.autoResubscribe boolValue]) { + // We don't support disabling auto-resubscribe. + return CHIP_ERROR_INVALID_ARGUMENT; + } + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, + [minInterval unsignedShortValue], [maxInterval unsignedShortValue], + CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], + params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); + }, + subscriptionEstablishedHandler); +} + ++ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(CHIPAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::NumberOfActuationsTilt::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeConfigStatusWithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { From 7111fd55b5262a28f92bb749d5ba34abfb71fb96 Mon Sep 17 00:00:00 2001 From: markaj-nordic <98948394+markaj-nordic@users.noreply.github.com> Date: Tue, 10 May 2022 10:12:32 +0200 Subject: [PATCH 14/26] [nrfconnect] add support for SSED in window-app. (#18198) Signed-off-by: Marcin Kajor --- examples/window-app/nrfconnect/README.md | 4 ++-- examples/window-app/nrfconnect/main/AppTask.cpp | 3 +++ .../window-app/nrfconnect/main/include/CHIPProjectConfig.h | 7 ++++++- examples/window-app/nrfconnect/overlay-low_power.conf | 3 +++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/examples/window-app/nrfconnect/README.md b/examples/window-app/nrfconnect/README.md index 8cf7548a42f8fb..526a19004bf8bd 100644 --- a/examples/window-app/nrfconnect/README.md +++ b/examples/window-app/nrfconnect/README.md @@ -377,8 +377,8 @@ Semiconductor's kit you own. ### Building with low-power configuration You can build the example using the low-power configuration, which enables -Thread's Sleepy End Device mode and disables debug features, such as the UART -console or the **LED 1** usage. +Thread's Synchronized Sleepy End Device mode and disables debug features, such +as the UART console or the **LED 1** usage. To build for the low-power configuration, run the following command with _build-target_ replaced with the build target name of the Nordic Semiconductor's diff --git a/examples/window-app/nrfconnect/main/AppTask.cpp b/examples/window-app/nrfconnect/main/AppTask.cpp index a03f5e28401a56..7f186f635bf315 100644 --- a/examples/window-app/nrfconnect/main/AppTask.cpp +++ b/examples/window-app/nrfconnect/main/AppTask.cpp @@ -100,9 +100,12 @@ CHIP_ERROR AppTask::Init() #ifdef CONFIG_OPENTHREAD_MTD_SED err = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_SleepyEndDevice); +#elif CONFIG_CHIP_THREAD_SSED + err = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_SynchronizedSleepyEndDevice); #else err = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice); #endif + if (err != CHIP_NO_ERROR) { LOG_ERR("ConnectivityMgr().SetThreadDeviceType() failed"); diff --git a/examples/window-app/nrfconnect/main/include/CHIPProjectConfig.h b/examples/window-app/nrfconnect/main/include/CHIPProjectConfig.h index 49000724fc6c47..df571c7319dd07 100644 --- a/examples/window-app/nrfconnect/main/include/CHIPProjectConfig.h +++ b/examples/window-app/nrfconnect/main/include/CHIPProjectConfig.h @@ -30,4 +30,9 @@ #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 -#define CHIP_DEVICE_CONFIG_SED_SLOW_POLLING_INTERVAL 2000_ms32 +#ifdef CONFIG_CHIP_THREAD_SSED +#define CHIP_DEVICE_CONFIG_SED_ACTIVE_INTERVAL 1000_ms32 +#define CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL 1000_ms32 +#else +#define CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL 2000_ms32 +#endif diff --git a/examples/window-app/nrfconnect/overlay-low_power.conf b/examples/window-app/nrfconnect/overlay-low_power.conf index c962425f6ef937..602eb4f76784e2 100644 --- a/examples/window-app/nrfconnect/overlay-low_power.conf +++ b/examples/window-app/nrfconnect/overlay-low_power.conf @@ -17,6 +17,9 @@ # Enable MTD Sleepy End Device CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT=y +# Enable Thread CSL to support Synchronized SED +CONFIG_CHIP_THREAD_SSED=y + # Disable UART console CONFIG_SHELL=n CONFIG_LOG=n From e81d33090e3af60a325dcc1a7a0462f7b3494aee Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Tue, 10 May 2022 21:05:25 +0800 Subject: [PATCH 15/26] [MbedTLS] Migrate mbedtls cmakefile to Matter SDK third_party folder (#18246) --- third_party/ameba/mbedtls.cmake | 91 +++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 third_party/ameba/mbedtls.cmake diff --git a/third_party/ameba/mbedtls.cmake b/third_party/ameba/mbedtls.cmake new file mode 100755 index 00000000000000..ef5b9d3eb8a1b2 --- /dev/null +++ b/third_party/ameba/mbedtls.cmake @@ -0,0 +1,91 @@ +cmake_minimum_required(VERSION 3.6) + +project(mbedtls) + +set(dir "${sdk_root}/component/common/network/ssl/mbedtls-matter") +set(dir_mbedtlschip "${ameba_matter_root}/third_party/mbedtls/repo/library") + +list( + APPEND ${list} + + # mbedtls-chip + ${dir}/net_sockets.c + ${dir_mbedtlschip}/aes.c + ${dir_mbedtlschip}/aesni.c + ${dir_mbedtlschip}/arc4.c + ${dir_mbedtlschip}/aria.c + ${dir_mbedtlschip}/asn1parse.c + ${dir_mbedtlschip}/asn1write.c + ${dir_mbedtlschip}/base64.c + ${dir_mbedtlschip}/bignum.c + ${dir_mbedtlschip}/blowfish.c + ${dir_mbedtlschip}/camellia.c + ${dir_mbedtlschip}/ccm.c + ${dir_mbedtlschip}/certs.c + ${dir_mbedtlschip}/chacha20.c + ${dir_mbedtlschip}/chachapoly.c + ${dir_mbedtlschip}/cipher.c + ${dir_mbedtlschip}/cipher_wrap.c + ${dir_mbedtlschip}/cmac.c + ${dir_mbedtlschip}/ctr_drbg.c + ${dir_mbedtlschip}/debug.c + ${dir_mbedtlschip}/des.c + ${dir_mbedtlschip}/dhm.c + ${dir_mbedtlschip}/ecdh.c + ${dir_mbedtlschip}/ecdsa.c + ${dir_mbedtlschip}/ecjpake.c + ${dir_mbedtlschip}/ecp.c + ${dir_mbedtlschip}/ecp_curves.c + ${dir_mbedtlschip}/entropy.c + ${dir_mbedtlschip}/entropy_poll.c + ${dir_mbedtlschip}/error.c + ${dir_mbedtlschip}/gcm.c + ${dir_mbedtlschip}/havege.c + ${dir_mbedtlschip}/hkdf.c + ${dir_mbedtlschip}/hmac_drbg.c + ${dir_mbedtlschip}/md2.c + ${dir_mbedtlschip}/md4.c + ${dir_mbedtlschip}/md5.c + ${dir_mbedtlschip}/md.c + ${dir_mbedtlschip}/memory_buffer_alloc.c + ${dir_mbedtlschip}/nist_kw.c + ${dir_mbedtlschip}/oid.c + ${dir_mbedtlschip}/padlock.c + ${dir_mbedtlschip}/pem.c + ${dir_mbedtlschip}/pk.c + ${dir_mbedtlschip}/pkcs11.c + ${dir_mbedtlschip}/pkcs12.c + ${dir_mbedtlschip}/pkcs5.c + ${dir_mbedtlschip}/pkparse.c + ${dir_mbedtlschip}/pk_wrap.c + ${dir_mbedtlschip}/pkwrite.c + ${dir_mbedtlschip}/platform.c + ${dir_mbedtlschip}/platform_util.c + ${dir_mbedtlschip}/poly1305.c + ${dir_mbedtlschip}/ripemd160.c + ${dir_mbedtlschip}/rsa.c + ${dir_mbedtlschip}/rsa_internal.c + ${dir_mbedtlschip}/sha1.c + ${dir_mbedtlschip}/sha256.c + ${dir_mbedtlschip}/sha512.c + ${dir_mbedtlschip}/ssl_cache.c + ${dir_mbedtlschip}/ssl_ciphersuites.c + ${dir_mbedtlschip}/ssl_cli.c + ${dir_mbedtlschip}/ssl_cookie.c + ${dir_mbedtlschip}/ssl_srv.c + ${dir_mbedtlschip}/ssl_ticket.c + ${dir_mbedtlschip}/ssl_tls.c + ${dir_mbedtlschip}/threading.c + ${dir_mbedtlschip}/timing.c + ${dir_mbedtlschip}/version.c + ${dir_mbedtlschip}/version_features.c + ${dir_mbedtlschip}/x509.c + ${dir_mbedtlschip}/x509_create.c + ${dir_mbedtlschip}/x509_crl.c + ${dir_mbedtlschip}/x509_crt.c + ${dir_mbedtlschip}/x509_csr.c + ${dir_mbedtlschip}/x509write_crt.c + ${dir_mbedtlschip}/x509write_csr.c + ${dir_mbedtlschip}/xtea.c +) + From 3f63f8ff12455cbaafe4974a6f7b95f0fea6c420 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Tue, 10 May 2022 21:06:32 +0800 Subject: [PATCH 16/26] [Ameba] Update dockerfile (#18252) --- integrations/docker/images/chip-build-ameba/Dockerfile | 2 +- integrations/docker/images/chip-build/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/chip-build-ameba/Dockerfile b/integrations/docker/images/chip-build-ameba/Dockerfile index 34bf222c35dd43..d1715f018a9a84 100644 --- a/integrations/docker/images/chip-build-ameba/Dockerfile +++ b/integrations/docker/images/chip-build-ameba/Dockerfile @@ -3,7 +3,7 @@ FROM connectedhomeip/chip-build:${VERSION} # Setup Ameba ARG AMEBA_DIR=/opt/ameba -ARG TAG_NAME=ameba_update_2022_04_05 +ARG TAG_NAME=ameba_update_2022_05_10 RUN set -x \ && apt-get update \ && mkdir ${AMEBA_DIR} \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index 4ba221a279d750..15eb8d60036a24 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.5.71 Version bump reason: [Tizen] Fix permission bits for secret-tool +0.5.72 Version bump reason: [Ameba] Migrate mbedtls cmake file to Matter SDK From 3e58a0eb64670291a1ed337f32984d96d56466fb Mon Sep 17 00:00:00 2001 From: cpagravel Date: Tue, 10 May 2022 06:11:33 -0700 Subject: [PATCH 17/26] Chef Refactor (#18009) * Chef - Add stateful_shell.py and constants.py Change-Id: Ia59a3d2a71204e4af2c41d6192d47f048a58c3b4 * Chef - Print splash text Change-Id: I9b162cabab700e87f12806668b2953bf57348449 * Chef - Use textwrap.dedent on textblocks Change-Id: I861f24ac20d440cf4a3e605809421a766ecdd476 * Chef - Remove use of commandQueue Change-Id: I75d5ae6fea25c6b933cb9823a29e9c2224b8188d * Chef - Replace shell writes with Python open() calls Change-Id: I0147fa6b96d3a15bf95352acbd136e8f1e648b8f * Chef - Make paths into global constants Change-Id: Ib177d584bcd463aaafe10f4f338a90d6b234c3f1 * Chef - Remove HexInputToInt Change-Id: Iebe5e76c169951e842262530d3feba5ac899a33c * Chef - Remove unused statements Change-Id: I56670e31722348fb47a1e59d2651cdcf3f983e28 * Chef - Convert variables to snake case per PEP8 Change-Id: I52520eec1dfb8093c39ce4570aa99cdd0b0d854a * Chef - Add function type hinting Change-Id: Ib82f0bf4752819b65d2c76058429931c6986bd83 --- examples/chef/chef.py | 458 ++++++++++++++------------------ examples/chef/constants.py | 19 ++ examples/chef/stateful_shell.py | 94 +++++++ 3 files changed, 312 insertions(+), 259 deletions(-) create mode 100644 examples/chef/constants.py create mode 100644 examples/chef/stateful_shell.py diff --git a/examples/chef/chef.py b/examples/chef/chef.py index 05cf43fedf08a3..899c3005201c0d 100755 --- a/examples/chef/chef.py +++ b/examples/chef/chef.py @@ -17,45 +17,47 @@ import sys import optparse import os -import subprocess -from pathlib import Path -from sys import platform +import sys +import textwrap +from typing import Sequence import yaml -global commandQueue -commandQueue = "" +import constants +import stateful_shell + +TermColors = constants.TermColors -class TermColors: - STRBOLD = '\033[1m' - STRRESET = '\033[0m' - STRCYAN = '\033[1;36m' - STRYELLOW = '\033[1;33m' +shell = stateful_shell.StatefulShell() +_CHEF_SCRIPT_PATH = os.path.abspath(os.path.dirname(__file__)) +_REPO_BASE_PATH = os.path.join(_CHEF_SCRIPT_PATH, "../../") +_DEVICE_FOLDER = os.path.join(_CHEF_SCRIPT_PATH, "devices") +_DEVICE_LIST = [file[:-4] for file in os.listdir(_DEVICE_FOLDER) if file.endswith(".zap")] -def splash(): - splashText = TermColors.STRBOLD + TermColors.STRYELLOW + '''\ - ______ __ __ _______ _______ - / || | | | | ____|| ____| -| ,----'| |__| | | |__ | |__ -| | | __ | | __| | __| -| `----.| | | | | |____ | | - \\______||__| |__| |_______||__|\ -''' + TermColors.STRRESET - return splash +gen_dir = "" # Filled in after sample app type is read from args. -def printc(strInput): - color = TermColors.STRCYAN - print(color + strInput + TermColors.STRRESET) +def splash() -> None: + splashText = textwrap.dedent( + f"""\ + {TermColors.STRBOLD}{TermColors.STRYELLOW} + ______ __ __ _______ _______ + / || | | | | ____|| ____| + | ,----'| |__| | | |__ | |__ + | | | __ | | __| | __| + | `----.| | | | | |____ | | + \\______||__| |__| |_______||__|{TermColors.STRRESET} + """) + print(splashText) -def loadConfig(paths): +def load_config() -> None: config = dict() config["nrfconnect"] = dict() config["esp32"] = dict() - configFile = paths["scriptFolder"] + "/config.yaml" + configFile = f"{_CHEF_SCRIPT_PATH}/config.yaml" if (os.path.exists(configFile)): configStream = open(configFile, 'r') config = yaml.load(configStream, Loader=yaml.SafeLoader) @@ -76,79 +78,22 @@ def loadConfig(paths): return config -def definePaths(): - paths = dict() - paths["scriptFolder"] = os.path.abspath(os.path.dirname(__file__)) - paths["matterFolder"] = paths["scriptFolder"] + "/../../" - paths["rootSampleFolder"] = paths["scriptFolder"] - paths["devices"] = [] - - for filepath in Path(f"{paths['rootSampleFolder']}/devices").rglob('*.zap'): - paths["devices"].append( - str(os.path.splitext(os.path.basename(filepath))[0])) - return paths - - -def checkPythonVersion(): +def check_python_version() -> None: if sys.version_info[0] < 3: print('Must use Python 3. Current version is ' + str(sys.version_info[0])) exit(1) -def queuePrint(str): - global commandQueue - if (len(commandQueue) > 0): - commandQueue = commandQueue + "; " - commandQueue = commandQueue + "echo -e " + str - - -def queueCommand(command): - global commandQueue - if (len(commandQueue) > 0): - commandQueue = commandQueue + "; " - commandQueue = commandQueue + command - - -def execQueue(): - global commandQueue - subprocess.run(commandQueue, shell=True, executable=shellApp) - commandQueue = "" - - -def hexInputToInt(valIn): - '''Parses inputs as hexadecimal numbers, takes into account optional 0x - prefix - ''' - if (type(valIn) is str): - if (valIn[0:2].lower() == "0x"): - valOut = valIn[2:] - else: - valOut = valIn - valOut = int(valOut, 16) - else: - valOut = valIn - return valOut - - -def main(argv): - checkPythonVersion() - paths = definePaths() - config = loadConfig(paths) - - global myEnv - myEnv = os.environ.copy() +def main(argv: Sequence[str]) -> None: + check_python_version() + config = load_config() # # Build environment switches # - global shellApp - if platform == "linux" or platform == "linux2": - shellApp = '/bin/bash' - elif platform == "darwin": - shellApp = '/bin/zsh' - elif platform == "win32": + if sys.platform == "win32": print('Windows is currently not supported. Use Linux or MacOS platforms') exit(1) @@ -156,60 +101,61 @@ def main(argv): # Arguments parser # - deviceTypes = "\n ".join(paths["devices"]) + deviceTypes = "\n ".join(_DEVICE_LIST) - usage = f'''usage: chef.py [options] + usage = textwrap.dedent(f"""\ + usage: chef.py [options] -Platforms: - nrfconnect - esp32 - linux + Platforms: + nrfconnect + esp32 + linux -Device Types: - {deviceTypes} + Device Types: + {deviceTypes} -Notes: -- Whenever you change a device type, make sure to also use options -zbe -- Be careful if you have more than one device connected. The script assumes you have only one device connected and might flash the wrong one\ -''' + Notes: + - Whenever you change a device type, make sure to also use options -zbe + - Be careful if you have more than one device connected. The script assumes you have only one device connected and might flash the wrong one\ + """) parser = optparse.OptionParser(usage=usage) parser.add_option("-u", "--update_toolchain", help="updates toolchain & installs zap", - action="store_true", dest="doUpdateToolchain") + action="store_true", dest="do_update_toolchain") parser.add_option("-b", "--build", help="builds", - action="store_true", dest="doBuild") + action="store_true", dest="do_build") parser.add_option("-c", "--clean", help="clean build. Only valid if also building", - action="store_true", dest="doClean") + action="store_true", dest="do_clean") parser.add_option("-f", "--flash", help="flashes device", - action="store_true", dest="doFlash") + action="store_true", dest="do_flash") parser.add_option("-e", "--erase", help="erases flash before flashing. Only valid if also flashing", - action="store_true", dest="doErase") + action="store_true", dest="do_erase") parser.add_option("-i", "--terminal", help="opens terminal to interact with with device", - action="store_true", dest="doInteract") + action="store_true", dest="do_interact") parser.add_option("-m", "--menuconfig", help="runs menuconfig on platforms that support it", - action="store_true", dest="doMenuconfig") + action="store_true", dest="do_menuconfig") parser.add_option("", "--bootstrap_zap", help="installs zap dependencies", - action="store_true", dest="doBootstrapZap") + action="store_true", dest="do_bootstrap_zap") parser.add_option("-z", "--zap", help="runs zap to generate data model & interaction model artifacts", - action="store_true", dest="doRunZap") + action="store_true", dest="do_run_zap") parser.add_option("-g", "--zapgui", help="runs zap GUI display to allow editing of data model", - action="store_true", dest="doRunGui") - parser.add_option("-d", "--device", dest="sampleDeviceTypeName", + action="store_true", dest="do_run_gui") + parser.add_option("-d", "--device", dest="sample_device_type_name", help="specifies device type. Default is lighting. See info above for supported device types", metavar="TARGET", default="lighting") parser.add_option("-t", "--target", type='choice', action='store', - dest="buildTarget", + dest="build_target", help="specifies target platform. Default is esp32. See info below for currently supported target platforms", choices=['nrfconnect', 'esp32', 'linux', ], metavar="TARGET", default="esp32") - parser.add_option("-r", "--rpc", help="enables Pigweed RPC interface. Enabling RPC disables the shell interface. Your sdkconfig configurations will be reverted to default. Default is PW RPC off. When enabling or disabling this flag, on the first build force a clean build with -c", action="store_true", dest="doRPC") - parser.add_option("-v", "--vid", dest="vid", + parser.add_option("-r", "--rpc", help="enables Pigweed RPC interface. Enabling RPC disables the shell interface. Your sdkconfig configurations will be reverted to default. Default is PW RPC off. When enabling or disabling this flag, on the first build force a clean build with -c", action="store_true", dest="do_rpc") + parser.add_option("-v", "--vid", dest="vid", type=int, help="specifies the Vendor ID. Default is 0xFFF1", metavar="VID", default=0xFFF1) - parser.add_option("-p", "--pid", dest="pid", + parser.add_option("-p", "--pid", dest="pid", type=int, help="specifies the Product ID. Default is 0x8000", metavar="PID", default=0x8000) parser.add_option("", "--rpc_console", help="Opens PW RPC Console", - action="store_true", dest="doRPC_CONSOLE") + action="store_true", dest="do_rpc_console") parser.add_option("-y", "--tty", help="Enumerated USB tty/serial interface enumerated for your physical device. E.g.: /dev/ACM0", dest="tty", metavar="TTY", default=None) @@ -221,161 +167,157 @@ def main(argv): # Platform Folder # - queuePrint(f"Target is set to {options.sampleDeviceTypeName}") - paths["genFolder"] = paths["rootSampleFolder"] + f"/out/{options.sampleDeviceTypeName}/zap-generated/" + print(f"Target is set to {options.sample_device_type_name}") + global gen_dir + gen_dir = ( + f"{_CHEF_SCRIPT_PATH}/out/{options.sample_device_type_name}/zap-generated/") - queuePrint("Setting up environment...") - if options.buildTarget == "esp32": + print("Setting up environment...") + if options.build_target == "esp32": if config['esp32']['IDF_PATH'] is None: print('Path for esp32 SDK was not found. Make sure esp32.IDF_PATH is set on your config.yaml file') exit(1) - paths["platFolder"] = os.path.normpath( - paths["rootSampleFolder"] + "/esp32") - queueCommand(f'source {config["esp32"]["IDF_PATH"]}/export.sh') - elif options.buildTarget == "nrfconnect": + plat_folder = os.path.normpath(f"{_CHEF_SCRIPT_PATH}/esp32") + shell.run_cmd(f'source {config["esp32"]["IDF_PATH"]}/export.sh') + elif options.build_target == "nrfconnect": if config['nrfconnect']['ZEPHYR_BASE'] is None: print('Path for nrfconnect SDK was not found. Make sure nrfconnect.ZEPHYR_BASE is set on your config.yaml file') exit(1) - paths["platFolder"] = os.path.normpath( - paths["rootSampleFolder"] + "/nrfconnect") - queueCommand(f'source {config["nrfconnect"]["ZEPHYR_BASE"]}/zephyr-env.sh') - queueCommand("export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb") - elif options.buildTarget == "linux": + plat_folder = os.path.normpath(f"{_CHEF_SCRIPT_PATH}/nrfconnect") + shell.run_cmd(f'source {config["nrfconnect"]["ZEPHYR_BASE"]}/zephyr-env.sh') + shell.run_cmd("export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb") + elif options.build_target == "linux": pass else: - print(f"Target {options.buildTarget} not supported") + print(f"Target {options.build_target} not supported") - queueCommand(f"source {paths['matterFolder']}/scripts/activate.sh") + shell.run_cmd(f"source {_REPO_BASE_PATH}/scripts/activate.sh") # # Toolchain update # - if options.doUpdateToolchain: - if options.buildTarget == "esp32": - queuePrint("ESP32 toolchain update not supported. Skipping") - elif options.buildTarget == "nrfconnect": - queuePrint("Updating toolchain") - queueCommand( - f"cd {paths['matterFolder']} && python3 scripts/setup/nrfconnect/update_ncs.py --update") - elif options.buildTarget == "linux": - queuePrint("Linux toolchain update not supported. Skipping") + if options.do_update_toolchain: + if options.build_target == "esp32": + print("ESP32 toolchain update not supported. Skipping") + elif options.build_target == "nrfconnect": + print("Updating toolchain") + shell.run_cmd( + f"cd {_REPO_BASE_PATH} && python3 scripts/setup/nrfconnect/update_ncs.py --update") + elif options.build_target == "linux": + print("Linux toolchain update not supported. Skipping") # # ZAP bootstrapping # - if options.doBootstrapZap: - if platform == "linux" or platform == "linux2": - queuePrint("Installing ZAP OS package dependencies") - queueCommand(f"sudo apt-get install sudo apt-get install node node-yargs npm libpixman-1-dev libcairo2-dev libpango1.0-dev node-pre-gyp libjpeg9-dev libgif-dev node-typescript") - if platform == "darwin": - queuePrint("Installation of ZAP OS packages not supported on MacOS") - if platform == "win32": - queuePrint( + if options.do_bootstrap_zap: + if sys.platform == "linux" or sys.platform == "linux2": + print("Installing ZAP OS package dependencies") + shell.run_cmd( + f"sudo apt-get install sudo apt-get install node node-yargs npm libpixman-1-dev libcairo2-dev libpango1.0-dev node-pre-gyp libjpeg9-dev libgif-dev node-typescript") + if sys.platform == "darwin": + print("Installation of ZAP OS packages not supported on MacOS") + if sys.platform == "win32": + print( "Installation of ZAP OS packages not supported on Windows") - queuePrint("Running NPM to install ZAP Node.JS dependencies") - queueCommand( - f"cd {paths['matterFolder']}/third_party/zap/repo/ && npm install") + print("Running NPM to install ZAP Node.JS dependencies") + shell.run_cmd( + f"cd {_REPO_BASE_PATH}/third_party/zap/repo/ && npm install") # # Cluster customization # - if options.doRunGui: - queuePrint("Starting ZAP GUI editor") - queueCommand(f"cd {paths['rootSampleFolder']}/devices") - queueCommand( - f"{paths['matterFolder']}/scripts/tools/zap/run_zaptool.sh {options.sampleDeviceTypeName}.zap") - - if options.doRunZap: - queuePrint("Running ZAP script to generate artifacts") - queueCommand(f"mkdir -p {paths['genFolder']}/") - queueCommand(f"rm {paths['genFolder']}/*") - queueCommand( - f"{paths['matterFolder']}/scripts/tools/zap/generate.py {paths['rootSampleFolder']}/devices/{options.sampleDeviceTypeName}.zap -o {paths['genFolder']}") + if options.do_run_gui: + print("Starting ZAP GUI editor") + shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/devices") + shell.run_cmd( + f"{_REPO_BASE_PATH}/scripts/tools/zap/run_zaptool.sh {options.sample_device_type_name}.zap") + + if options.do_run_zap: + print("Running ZAP script to generate artifacts") + shell.run_cmd(f"mkdir -p {gen_dir}/") + shell.run_cmd(f"rm {gen_dir}/*") + shell.run_cmd( + f"{_REPO_BASE_PATH}/scripts/tools/zap/generate.py {_CHEF_SCRIPT_PATH}/devices/{options.sample_device_type_name}.zap -o {gen_dir}") # af-gen-event.h is not generated - queueCommand(f"touch {paths['genFolder']}/af-gen-event.h") + shell.run_cmd(f"touch {gen_dir}/af-gen-event.h") # # Menuconfig # - if options.doMenuconfig: - if options.buildTarget == "esp32": - queueCommand(f"cd {paths['rootSampleFolder']}/esp32") - queueCommand("idf.py menuconfig") - elif options.buildTarget == "nrfconnect": - queueCommand(f"cd {paths['rootSampleFolder']}/nrfconnect") - queueCommand("west build -t menuconfig") - elif options.buildTarget == "linux": - queuePrint("Menuconfig not available on Linux target. Skipping") + if options.do_menuconfig: + if options.build_target == "esp32": + shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/esp32") + shell.run_cmd("idf.py menuconfig") + elif options.build_target == "nrfconnect": + shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}/nrfconnect") + shell.run_cmd("west build -t menuconfig") + elif options.build_target == "linux": + print("Menuconfig not available on Linux target. Skipping") # # Build # - if options.doBuild: - queuePrint("Building...") - if options.doRPC: - queuePrint("RPC PW enabled") - queueCommand( - f"export SDKCONFIG_DEFAULTS={paths['rootSampleFolder']}/esp32/sdkconfig_rpc.defaults") + if options.do_build: + print("Building...") + if options.do_rpc: + print("RPC PW enabled") + shell.run_cmd( + f"export SDKCONFIG_DEFAULTS={_CHEF_SCRIPT_PATH}/esp32/sdkconfig_rpc.defaults") else: - queuePrint("RPC PW disabled") - queueCommand( - f"export SDKCONFIG_DEFAULTS={paths['rootSampleFolder']}/esp32/sdkconfig.defaults") - options.vid = hexInputToInt(options.vid) - options.pid = hexInputToInt(options.pid) - queuePrint( + print("RPC PW disabled") + shell.run_cmd( + f"export SDKCONFIG_DEFAULTS={_CHEF_SCRIPT_PATH}/esp32/sdkconfig.defaults") + print( f"Product ID 0x{options.pid:02X} / Vendor ID 0x{options.vid:02X}") - queueCommand(f"cd {paths['rootSampleFolder']}") - - if (options.buildTarget == "esp32") or (options.buildTarget == "nrfconnect"): - queueCommand(f''' -cat > project_include.cmake < args.gni < sample.gni < None: + if sys.platform == "linux" or sys.platform == "linux2": + self.shell_app = '/bin/bash' + elif sys.platform == "darwin": + self.shell_app = '/bin/zsh' + elif sys.platform == "win32": + print('Windows is currently not supported. Use Linux or MacOS platforms') + exit(1) + + self.env: Dict[str, str] = os.environ.copy() + self.cwd: str = self.env["PWD"] + + # This file holds the env after running a command. This is a better approach + # than writing to stdout because commands could redirect the stdout. + self.envfile_path: str = os.path.join(tempfile.gettempdir(), "envfile") + + def print_env(self) -> None: + """Print environment variables in commandline friendly format for export. + + The purpose of this function is to output the env variables in such a way + that a user can copy the env variables and paste them in their terminal to + quickly recreate the environment state. + """ + for env_var in self.env: + quoted_value = shlex.quote(self.env[env_var]) + if env_var: + print(f"export {env_var}={quoted_value}") + + def run_cmd(self, cmd: str, *, raise_on_returncode=False) -> None: + """Runs a command and updates environment. + + Args: + cmd: Command to execute. + raise_on_returncode: Whether to raise an error if the return code is nonzero. + + Raises: + RuntimeError: If raise_on_returncode is set and nonzero return code is given. + """ + env_dict = {} + + # Set OLDPWD at beginning because opening the shell clears this. This handles 'cd -'. + # env -0 prints the env variables separated by null characters for easy parsing. + command_with_state = f"OLDPWD={self.env.get('OLDPWD', '')}; {cmd}; env -0 > {self.envfile_path}" + with subprocess.Popen( + [command_with_state], + env=self.env, cwd=self.cwd, + shell=True, executable=self.shell_app + ) as proc: + returncode = proc.wait() + + # Load env state from envfile. + with open(self.envfile_path) as f: + # Split on null char because we use env -0. + env_entries = f.read().split("\0") + for entry in env_entries: + parts = entry.split("=") + # Handle case where an env variable contains text with '='. + env_dict[parts[0]] = "=".join(parts[1:]) + self.env = env_dict + self.cwd = self.env["PWD"] + + if raise_on_returncode and returncode != 0: + raise RuntimeError( + f"Error. Return code is not 0. It is: {returncode}") From 2580fb35d322ba9ad370f3e20ca5f38673aa87c7 Mon Sep 17 00:00:00 2001 From: Song GUO Date: Tue, 10 May 2022 21:48:33 +0800 Subject: [PATCH 18/26] [example] Fix CommandList for GeneralCommissioning cluster on all-clusters-app (#17833) * [examples] Fix GeneratedCommandList and AcceptedCommandList * Run Codegen * Fix test case -- yes, it should contain 8 * Fix Test - Run Codegen * Fix generated code format --- src/app/tests/suites/TestCluster.yaml | 2 +- src/app/zap-templates/templates/app/helper.js | 30 ++- .../zap-generated/endpoint_config.h | 249 ++++++++++-------- .../zap-generated/endpoint_config.h | 51 ++-- .../zap-generated/test/Commands.h | 9 +- .../chip-tool/zap-generated/test/Commands.h | 10 +- .../zap-generated/endpoint_config.h | 77 +++--- .../zap-generated/endpoint_config.h | 93 +++---- .../lock-app/zap-generated/endpoint_config.h | 86 +++--- .../zap-generated/endpoint_config.h | 30 ++- .../zap-generated/endpoint_config.h | 26 +- .../zap-generated/endpoint_config.h | 28 +- .../app1/zap-generated/endpoint_config.h | 112 ++++---- .../app2/zap-generated/endpoint_config.h | 112 ++++---- .../pump-app/zap-generated/endpoint_config.h | 72 ++--- .../zap-generated/endpoint_config.h | 60 +++-- .../zap-generated/endpoint_config.h | 43 +-- .../zap-generated/endpoint_config.h | 85 +++--- .../tv-app/zap-generated/endpoint_config.h | 144 +++++----- .../zap-generated/endpoint_config.h | 106 ++++---- .../zap-generated/endpoint_config.h | 80 +++--- 21 files changed, 808 insertions(+), 697 deletions(-) diff --git a/src/app/tests/suites/TestCluster.yaml b/src/app/tests/suites/TestCluster.yaml index a42624a12b6555..5d7101ee3a4553 100644 --- a/src/app/tests/suites/TestCluster.yaml +++ b/src/app/tests/suites/TestCluster.yaml @@ -3778,7 +3778,7 @@ tests: command: "readAttribute" attribute: "GeneratedCommandList" response: - value: [0, 1, 4, 5, 6, 9, 10, 11] + value: [0, 1, 4, 5, 6, 8, 9, 10, 11] # Struct-typed attribute - label: "Write struct-typed attribute" diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index 1806056f1310a4..924262c4758d11 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -141,7 +141,8 @@ function chip_endpoint_generated_functions() function chip_endpoint_generated_commands_list(options) { - let ret = []; + let ret = []; + let index = 0; this.clusterList.forEach((c) => { let acceptedCommands = []; let generatedCommands = []; @@ -149,22 +150,26 @@ function chip_endpoint_generated_commands_list(options) c.commands.forEach((cmd) => { if (cmd.mask.includes('incoming_server')) { acceptedCommands.push(`${cmd.commandId} /* ${cmd.name} */`); - } - if (cmd.mask.includes('incoming_client')) { - generatedCommands.push(`${cmd.commandId} /* ${cmd.name} */`); + if (cmd.responseId !== null) { + generatedCommands.push(`${cmd.responseId} /* ${cmd.responseName} */`); + } } }); + generatedCommands = [...new Set(generatedCommands) ].sort(); + if (acceptedCommands.length > 0 || generatedCommands.length > 0) { ret.push({ text : ` /* ${c.comment} */\\` }); } if (acceptedCommands.length > 0) { acceptedCommands.push('chip::kInvalidCommandId /* end of list */') - ret.push({ text : ` /* client_generated */ \\\n ${acceptedCommands.join(', \\\n ')}, \\` }); + ret.push({ text : ` /* AcceptedCommandList (index=${index}) */ \\\n ${acceptedCommands.join(', \\\n ')}, \\` }); + index += acceptedCommands.length; } if (generatedCommands.length > 0) { generatedCommands.push('chip::kInvalidCommandId /* end of list */') - ret.push({ text : ` /* server_generated */ \\\n ${generatedCommands.join(', \\\n ')}, \\` }); + ret.push({ text : ` /* GeneratedCommandList (index=${index})*/ \\\n ${generatedCommands.join(', \\\n ')}, \\` }); + index += generatedCommands.length; } }) return templateUtil.collectBlocks(ret, options, this); @@ -217,8 +222,17 @@ function chip_endpoint_cluster_list() mask = c.mask.map((m) => `ZAP_CLUSTER_MASK(${m.toUpperCase()})`).join(' | ') } - let acceptedCommands = c.commands.reduce(((acc, cmd) => (acc + (cmd.mask.includes('incoming_server') ? 1 : 0))), 0); - let generatedCommands = c.commands.reduce(((acc, cmd) => (acc + (cmd.mask.includes('incoming_client') ? 1 : 0))), 0); + let acceptedCommands = 0; + let generatedCommandList = []; + c.commands.forEach((cmd) => { + if (cmd.mask.includes('incoming_server')) { + acceptedCommands++; + if (cmd.responseId !== null) { + generatedCommandList.push(cmd.responseId); + } + } + }); + let generatedCommands = new Set(generatedCommandList).size; let acceptedCommandsListVal = "nullptr"; let generatedCommandsListVal = "nullptr"; diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 31d8353811134b..4a06756f344352 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -2056,16 +2056,16 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=4)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=6) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -2073,29 +2073,30 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=13)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=18) */ \ 0x00000000 /* AnnounceOtaProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=20) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=25)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=29) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -2104,38 +2105,42 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=37)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=41) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=43)*/ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=45) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=47) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=49) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=51) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=53) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=57) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -2146,34 +2151,34 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=67)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=72) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=77)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=80) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=84)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=86) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -2181,14 +2186,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=93)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=98) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -2197,7 +2202,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=106)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -2206,7 +2211,7 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=113) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -2215,7 +2220,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=120) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -2226,11 +2231,11 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Mode Select (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=129) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Door Lock (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=131) */ \ 0x00000000 /* LockDoor */, \ 0x00000001 /* UnlockDoor */, \ 0x00000003 /* UnlockWithTimeout */, \ @@ -2246,8 +2251,15 @@ 0x00000024 /* GetCredentialStatus */, \ 0x00000026 /* ClearCredential */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=146)*/ \ + 0x0000000C /* GetWeekDayScheduleResponse */, \ + 0x0000000F /* GetYearDayScheduleResponse */, \ + 0x0000001C /* GetUserResponse */, \ + 0x00000023 /* SetCredentialResponse */, \ + 0x00000025 /* GetCredentialStatusResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Window Covering (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=152) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -2257,18 +2269,18 @@ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Barrier Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=160) */ \ 0x00000000 /* BarrierControlGoToPercent */, \ 0x00000001 /* BarrierControlStop */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=163) */ \ 0x00000000 /* SetpointRaiseLower */, \ 0x00000000 /* GetWeeklyScheduleResponse */, \ 0x00000001 /* GetRelayStatusLogResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=167) */ \ 0x00000000 /* MoveToHue */, \ 0x00000001 /* MoveHue */, \ 0x00000002 /* StepHue */, \ @@ -2290,63 +2302,80 @@ 0x0000004C /* StepColorTemperature */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: IAS Zone (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=187) */ \ 0x00000000 /* ZoneEnrollResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ - 0x00000000 /* ZoneStatusChangeNotification */, \ - 0x00000001 /* ZoneEnrollRequest */, \ - chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Channel (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=189) */ \ 0x00000000 /* ChangeChannel */, \ 0x00000002 /* ChangeChannelByNumber */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=192)*/ \ + 0x00000001 /* ChangeChannelResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Target Navigator (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=194) */ \ 0x00000000 /* NavigateTarget */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=196)*/ \ + 0x00000001 /* NavigateTargetResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Playback (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=198) */ \ 0x00000000 /* Play */, \ 0x00000001 /* Pause */, \ 0x00000002 /* StopPlayback */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=202)*/ \ + 0x0000000A /* PlaybackResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Input (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=204) */ \ 0x00000000 /* SelectInput */, \ 0x00000001 /* ShowInputStatus */, \ 0x00000002 /* HideInputStatus */, \ 0x00000003 /* RenameInput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Low Power (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=209) */ \ 0x00000000 /* Sleep */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Keypad Input (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=211) */ \ 0x00000000 /* SendKey */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=213)*/ \ + 0x00000001 /* SendKeyResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Content Launcher (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=215) */ \ 0x00000000 /* LaunchContent */, \ 0x00000001 /* LaunchURL */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=218)*/ \ + 0x00000002 /* LaunchResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Audio Output (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=220) */ \ 0x00000000 /* SelectOutput */, \ 0x00000001 /* RenameOutput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Application Launcher (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=223) */ \ 0x00000000 /* LaunchApp */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=225)*/ \ + 0x00000003 /* LauncherResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Account Login (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=227) */ \ 0x00000000 /* GetSetupPIN */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=229)*/ \ + 0x00000001 /* GetSetupPINResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Test Cluster (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=231) */ \ 0x00000000 /* Test */, \ 0x00000001 /* TestNotHandled */, \ 0x00000002 /* TestSpecific */, \ @@ -2366,18 +2395,19 @@ 0x00000014 /* TestEmitTestEventRequest */, \ 0x00000015 /* TestEmitTestFabricScopedEventRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=250)*/ \ 0x00000000 /* TestSpecificResponse */, \ 0x00000001 /* TestAddArgumentsResponse */, \ 0x00000004 /* TestListInt8UReverseResponse */, \ 0x00000005 /* TestEnumsResponse */, \ 0x00000006 /* TestNullableOptionalResponse */, \ + 0x00000008 /* BooleanResponse */, \ 0x00000009 /* SimpleStructResponse */, \ 0x0000000A /* TestEmitTestEventResponse */, \ 0x0000000B /* TestEmitTestFabricScopedEventResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=260) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -2385,20 +2415,20 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=267)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=272) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=276) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -2406,8 +2436,9 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=283)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ } @@ -2581,8 +2612,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -2592,8 +2623,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -2614,7 +2645,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2625,7 +2656,7 @@ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2636,7 +2667,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2647,7 +2678,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2658,7 +2689,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2669,8 +2700,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 57 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 67 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ @@ -2680,8 +2711,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 73 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -2724,8 +2755,8 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 84 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ @@ -2735,8 +2766,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 93 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ @@ -2746,8 +2777,8 @@ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 94 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 98 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 106 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ @@ -2757,7 +2788,7 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 109 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 113 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2779,7 +2810,7 @@ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 116 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 120 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2889,7 +2920,7 @@ .clusterSize = 44, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 125 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 129 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2900,8 +2931,8 @@ .clusterSize = 54, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayDoorLockServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 127 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 131 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 146 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ @@ -2911,7 +2942,7 @@ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 142 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 152 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2922,7 +2953,7 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 150 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 160 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2944,7 +2975,7 @@ .clusterSize = 34, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 153 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 163 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -2977,7 +3008,7 @@ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 157 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 167 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -3054,8 +3085,8 @@ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ .functions = chipFuncArrayIasZoneServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 177 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 179 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 187 ) ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ @@ -3076,8 +3107,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 182 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 189 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 192 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ @@ -3087,8 +3118,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 185 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 194 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 196 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ @@ -3098,8 +3129,8 @@ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 187 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 198 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 202 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ @@ -3109,7 +3140,7 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 191 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 204 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -3120,7 +3151,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 196 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 209 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -3131,8 +3162,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 198 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 211 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 213 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ @@ -3142,8 +3173,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 200 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 215 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 218 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ @@ -3153,7 +3184,7 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 203 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 220 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -3164,8 +3195,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 206 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 223 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 225 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ @@ -3186,8 +3217,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 208 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 227 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 229 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Test Cluster (server) */ \ @@ -3197,8 +3228,8 @@ .clusterSize = 2285, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 210 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 229 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 231 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 250 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ @@ -3219,8 +3250,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 238 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 245 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 260 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 267 ) ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ @@ -3230,7 +3261,7 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 250 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 272 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -3274,8 +3305,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 254 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 261 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 276 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 283 ) ,\ },\ } diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 8969de149dac31..a610e8ca8b7bb8 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -788,17 +788,18 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=4)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=8) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -806,30 +807,34 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=15)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=19) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=21)*/ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=23) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=25) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=27) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=31) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -840,20 +845,20 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=41)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=46) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=50) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -968,8 +973,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 14 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 8 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -979,8 +984,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1001,7 +1006,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1034,7 +1039,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1045,7 +1050,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1056,8 +1061,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -1089,7 +1094,7 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 42 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1100,7 +1105,7 @@ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index 72f8c905c6a138..22950d5ec073ae 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -83729,15 +83729,16 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(8))); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(9))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 4UL)); VerifyOrReturn(CheckValue("", actualValue[3], 5UL)); VerifyOrReturn(CheckValue("", actualValue[4], 6UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 9UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 10UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 11UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 8UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 9UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 10UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 11UL)); } NextTest(); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 22136312476080..a26b9023f8c767 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -40522,12 +40522,14 @@ class TestClusterSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 4)); VerifyOrReturn(CheckValue("generatedCommandList[4]", iter_0.GetValue(), 6UL)); VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 5)); - VerifyOrReturn(CheckValue("generatedCommandList[5]", iter_0.GetValue(), 9UL)); + VerifyOrReturn(CheckValue("generatedCommandList[5]", iter_0.GetValue(), 8UL)); VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 6)); - VerifyOrReturn(CheckValue("generatedCommandList[6]", iter_0.GetValue(), 10UL)); + VerifyOrReturn(CheckValue("generatedCommandList[6]", iter_0.GetValue(), 9UL)); VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 7)); - VerifyOrReturn(CheckValue("generatedCommandList[7]", iter_0.GetValue(), 11UL)); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 8)); + VerifyOrReturn(CheckValue("generatedCommandList[7]", iter_0.GetValue(), 10UL)); + VerifyOrReturn(CheckNextListItemDecodes("generatedCommandList", iter_0, 8)); + VerifyOrReturn(CheckValue("generatedCommandList[8]", iter_0.GetValue(), 11UL)); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 9)); } } break; diff --git a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h index fa2f05a289fd03..42e1140c222217 100644 --- a/zzz_generated/light-switch-app/zap-generated/endpoint_config.h +++ b/zzz_generated/light-switch-app/zap-generated/endpoint_config.h @@ -737,21 +737,22 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* AnnounceOtaProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=2) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=6)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=10) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -759,38 +760,42 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=17)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=21) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=23)*/ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=25) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=27) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=29) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=31) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=33) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=37) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -801,34 +806,34 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=47)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=52) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=57)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=60) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=64)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=66) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -836,7 +841,7 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=73)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ @@ -958,8 +963,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 9 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 10 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -969,8 +974,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -991,7 +996,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1002,7 +1007,7 @@ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1013,7 +1018,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1024,7 +1029,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1046,7 +1051,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1057,8 +1062,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ @@ -1068,8 +1073,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 57 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -1112,8 +1117,8 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ @@ -1123,8 +1128,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 62 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 73 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (client) */ \ diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index d0817d2f6042f0..400a67d6c6fd76 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -865,7 +865,7 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -873,28 +873,29 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=7)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=12) */ \ 0x00000000 /* AnnounceOtaProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=14) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=18)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=22) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -902,38 +903,42 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=29)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=33) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=35)*/ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=37) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=39) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=41) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=43) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=45) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=49) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -944,34 +949,34 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=59)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=64) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=69)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=72) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=76)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=78) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -979,14 +984,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=85)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=90) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -995,7 +1000,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=97) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1006,7 +1011,7 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=106) */ \ 0x00000000 /* MoveToHue */, \ 0x00000001 /* MoveHue */, \ 0x00000002 /* StepHue */, \ @@ -1143,8 +1148,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -1154,8 +1159,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1176,7 +1181,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1187,7 +1192,7 @@ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1198,7 +1203,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1209,7 +1214,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1231,7 +1236,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1242,8 +1247,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ @@ -1253,8 +1258,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -1286,8 +1291,8 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ @@ -1297,8 +1302,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 81 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 85 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ @@ -1308,7 +1313,7 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 90 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1319,7 +1324,7 @@ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 93 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 97 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1341,7 +1346,7 @@ .clusterSize = 40, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 106 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index cb33236ae2f813..b1f6f2917c6626 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -884,21 +884,22 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* AnnounceOtaProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=2) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=6)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=10) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -906,38 +907,42 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=17)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=21) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=23)*/ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=25) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=27) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=29) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=31) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=33) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=37) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -948,22 +953,22 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=47)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=52) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=55)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=57) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -971,20 +976,20 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=64)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=69) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Door Lock (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=73) */ \ 0x00000000 /* LockDoor */, \ 0x00000001 /* UnlockDoor */, \ 0x00000003 /* UnlockWithTimeout */, \ @@ -1001,6 +1006,13 @@ 0x00000024 /* GetCredentialStatus */, \ 0x00000026 /* ClearCredential */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=89)*/ \ + 0x0000000C /* GetWeekDayScheduleResponse */, \ + 0x0000000F /* GetYearDayScheduleResponse */, \ + 0x0000001C /* GetUserResponse */, \ + 0x00000023 /* SetCredentialResponse */, \ + 0x00000025 /* GetCredentialStatusResponse */, \ + chip::kInvalidCommandId /* end of list */, \ } // clang-format on @@ -1128,8 +1140,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 9 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 10 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -1139,8 +1151,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1161,7 +1173,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1172,7 +1184,7 @@ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1183,7 +1195,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1194,7 +1206,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1205,7 +1217,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1216,8 +1228,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -1249,8 +1261,8 @@ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ @@ -1260,8 +1272,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 57 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ @@ -1271,7 +1283,7 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1304,8 +1316,8 @@ .clusterSize = 40, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayDoorLockServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 73 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ },\ } diff --git a/zzz_generated/log-source-app/zap-generated/endpoint_config.h b/zzz_generated/log-source-app/zap-generated/endpoint_config.h index 419287ffb1d196..e1a0b73037459c 100644 --- a/zzz_generated/log-source-app/zap-generated/endpoint_config.h +++ b/zzz_generated/log-source-app/zap-generated/endpoint_config.h @@ -124,17 +124,18 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=4)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=8) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -142,19 +143,20 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=15)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=19) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=21)*/ \ 0x00000001 /* RetrieveLogsResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=23) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -163,7 +165,7 @@ 0x0000000A /* RemoveFabric */, \ 0x0000000B /* AddTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=31)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ @@ -208,8 +210,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 14 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 8 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (client) */ \ @@ -230,8 +232,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ @@ -241,8 +243,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ },\ } diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index be6368b2532ae1..82dde9effeafca 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -261,27 +261,28 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* QueryImage */, \ 0x00000002 /* ApplyUpdateRequest */, \ 0x00000004 /* NotifyUpdateApplied */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=4)*/ \ 0x00000001 /* QueryImageResponse */, \ 0x00000003 /* ApplyUpdateResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=7) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=11)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=15) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -289,12 +290,13 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=22)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=26) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -303,7 +305,7 @@ 0x0000000A /* RemoveFabric */, \ 0x0000000B /* AddTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=34)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ @@ -403,8 +405,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 14 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ @@ -414,8 +416,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 24 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 26 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 34 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index 7c1fa09a54c286..fca2f17fc5a5b7 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -273,21 +273,22 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* AnnounceOtaProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=2) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=6)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=10) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -295,18 +296,19 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=17)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=21) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=25) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -317,7 +319,7 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=35)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ @@ -417,8 +419,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 9 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 10 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ) ,\ },\ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -428,7 +430,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -439,8 +441,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 1fe18666687b6d..61d1c927c239d2 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -887,7 +887,7 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -896,17 +896,18 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=7) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=11)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=15) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -915,30 +916,31 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=23)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=27) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=29) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=31) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=33) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=37) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -949,18 +951,18 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=47)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Mode Select (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=52) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Window Covering (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=54) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -970,43 +972,43 @@ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thermostat (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=62) */ \ 0x00000000 /* SetpointRaiseLower */, \ 0x00000000 /* GetWeeklyScheduleResponse */, \ 0x00000001 /* GetRelayStatusLogResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Target Navigator (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=66) */ \ 0x00000000 /* NavigateTarget */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=68)*/ \ 0x00000001 /* NavigateTargetResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Keypad Input (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=70) */ \ 0x00000000 /* SendKey */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=72)*/ \ 0x00000001 /* SendKeyResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Content Launcher (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=74) */ \ 0x00000000 /* LaunchContent */, \ 0x00000001 /* LaunchURL */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=77)*/ \ 0x00000002 /* LaunchResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=79) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=82)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=84) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1014,14 +1016,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=91)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=96) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1030,7 +1032,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=104)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1039,13 +1041,13 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=111) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=115) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1056,7 +1058,7 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=124) */ \ 0x00000007 /* MoveToColor */, \ 0x00000008 /* MoveColor */, \ 0x00000009 /* StepColor */, \ @@ -1177,8 +1179,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 14 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1199,7 +1201,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1210,7 +1212,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1221,7 +1223,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1254,7 +1256,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1276,8 +1278,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Boolean State (server) */ \ @@ -1309,7 +1311,7 @@ .clusterSize = 41, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1320,7 +1322,7 @@ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1342,7 +1344,7 @@ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 62 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1463,8 +1465,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Keypad Input (client) */ \ @@ -1485,8 +1487,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Content Launcher (client) */ \ @@ -1507,8 +1509,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 75 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Application Basic (client) */ \ @@ -1540,8 +1542,8 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ @@ -1551,8 +1553,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 84 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 91 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ @@ -1562,8 +1564,8 @@ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 94 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 96 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 104 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (client) */ \ @@ -1584,7 +1586,7 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 109 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 111 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1595,7 +1597,7 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 113 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 115 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1617,7 +1619,7 @@ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 122 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 124 ) ,\ .generatedCommandList = nullptr ,\ },\ } diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index 1fe18666687b6d..61d1c927c239d2 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -887,7 +887,7 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -896,17 +896,18 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=7) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=11)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=15) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -915,30 +916,31 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=23)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=27) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=29) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=31) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=33) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=37) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -949,18 +951,18 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=47)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Mode Select (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=52) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Window Covering (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=54) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -970,43 +972,43 @@ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thermostat (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=62) */ \ 0x00000000 /* SetpointRaiseLower */, \ 0x00000000 /* GetWeeklyScheduleResponse */, \ 0x00000001 /* GetRelayStatusLogResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Target Navigator (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=66) */ \ 0x00000000 /* NavigateTarget */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=68)*/ \ 0x00000001 /* NavigateTargetResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Keypad Input (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=70) */ \ 0x00000000 /* SendKey */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=72)*/ \ 0x00000001 /* SendKeyResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Content Launcher (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=74) */ \ 0x00000000 /* LaunchContent */, \ 0x00000001 /* LaunchURL */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=77)*/ \ 0x00000002 /* LaunchResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=79) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=82)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=84) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1014,14 +1016,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=91)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=96) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1030,7 +1032,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=104)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1039,13 +1041,13 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=111) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=115) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1056,7 +1058,7 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=124) */ \ 0x00000007 /* MoveToColor */, \ 0x00000008 /* MoveColor */, \ 0x00000009 /* StepColor */, \ @@ -1177,8 +1179,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 14 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1199,7 +1201,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1210,7 +1212,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1221,7 +1223,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1254,7 +1256,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1276,8 +1278,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Boolean State (server) */ \ @@ -1309,7 +1311,7 @@ .clusterSize = 41, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1320,7 +1322,7 @@ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1342,7 +1344,7 @@ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 62 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1463,8 +1465,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Keypad Input (client) */ \ @@ -1485,8 +1487,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Content Launcher (client) */ \ @@ -1507,8 +1509,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 75 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Application Basic (client) */ \ @@ -1540,8 +1542,8 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ @@ -1551,8 +1553,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 84 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 91 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ @@ -1562,8 +1564,8 @@ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 94 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 96 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 104 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (client) */ \ @@ -1584,7 +1586,7 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 109 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 111 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1595,7 +1597,7 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 113 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 115 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1617,7 +1619,7 @@ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 122 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 124 ) ,\ .generatedCommandList = nullptr ,\ },\ } diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index f8b9468cb35030..1d3027e23fc710 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -1083,16 +1083,16 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=4)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=6) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1100,14 +1100,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=13)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Scenes (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=18) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1116,7 +1116,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=26)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1125,21 +1125,22 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=33) */ \ 0x00000000 /* AnnounceOtaProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=35) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=39)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=43) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -1147,33 +1148,34 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=50)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=54) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=56)*/ \ 0x00000001 /* RetrieveLogsResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=58) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=60) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=62) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=66) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -1184,25 +1186,25 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=76)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=81) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=86)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=89) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -1211,7 +1213,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=96) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1370,8 +1372,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 42 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -1381,8 +1383,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1403,7 +1405,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1414,7 +1416,7 @@ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1425,7 +1427,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 62 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1436,8 +1438,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ @@ -1447,8 +1449,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 84 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 81 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -1480,7 +1482,7 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 87 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1491,7 +1493,7 @@ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 94 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 96 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index b3363def4ccb0a..52f888f3b23b97 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -866,16 +866,16 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=4)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=6) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -883,28 +883,29 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=13)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=18) */ \ 0x00000000 /* AnnounceOtaProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=20) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=24)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=28) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -912,33 +913,34 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=35)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=39) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=41)*/ \ 0x00000001 /* RetrieveLogsResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=43) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=45) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=47) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=51) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -949,20 +951,20 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=61)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=66) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=71)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ @@ -1104,8 +1106,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 34 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -1115,8 +1117,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1137,7 +1139,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1148,7 +1150,7 @@ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1159,7 +1161,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1170,8 +1172,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ @@ -1181,8 +1183,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 71 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index 3ec5e9c601b104..3d1b66153859b4 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -393,47 +393,52 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=4)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=8) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000004 /* RemoveNetwork */, \ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=14)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=18) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=20)*/ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=22) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=24) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=26) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=30) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -444,7 +449,7 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=40)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ @@ -544,8 +549,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 13 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 8 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 14 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -555,8 +560,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 20 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -577,7 +582,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -599,7 +604,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 20 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 24 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -610,7 +615,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 26 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -621,8 +626,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 26 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 40 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index 3edb2f194d6da9..f1bc12ffb5ce12 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -855,36 +855,37 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=3)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=5) */ \ 0x00000000 /* QueryImage */, \ 0x00000002 /* ApplyUpdateRequest */, \ 0x00000004 /* NotifyUpdateApplied */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=9)*/ \ 0x00000001 /* QueryImageResponse */, \ 0x00000003 /* ApplyUpdateResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=12) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=17)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=21) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -892,30 +893,34 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=28)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=32) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=34)*/ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=36) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=38) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=40) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=44) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -926,22 +931,22 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=54)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=59) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=62)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=64) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -949,14 +954,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=71)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=76) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -965,7 +970,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=84)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -974,7 +979,7 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=91) */ \ 0x00000000 /* SetpointRaiseLower */, \ 0x00000000 /* GetWeeklyScheduleResponse */, \ 0x00000001 /* SetWeeklySchedule */, \ @@ -983,6 +988,10 @@ 0x00000003 /* ClearWeeklySchedule */, \ 0x00000004 /* GetRelayStatusLog */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=99)*/ \ + 0x00000000 /* GetWeeklyScheduleResponse */, \ + 0x00000001 /* GetRelayStatusLogResponse */, \ + chip::kInvalidCommandId /* end of list */, \ } // clang-format on @@ -1110,8 +1119,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 20 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -1121,8 +1130,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 34 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1143,7 +1152,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1176,7 +1185,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 34 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 38 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1187,7 +1196,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 40 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1198,8 +1207,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 40 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 44 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ @@ -1253,8 +1262,8 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 62 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ @@ -1264,8 +1273,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 67 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 71 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ @@ -1275,8 +1284,8 @@ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 84 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Basic (server) */ \ @@ -1297,8 +1306,8 @@ .clusterSize = 34, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 87 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 91 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 99 ) ,\ },\ } diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 5ea48254fb5796..ef220ff9aa9c41 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1060,28 +1060,29 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* QueryImage */, \ 0x00000002 /* ApplyUpdateRequest */, \ 0x00000004 /* NotifyUpdateApplied */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=4)*/ \ 0x00000001 /* QueryImageResponse */, \ 0x00000003 /* ApplyUpdateResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=7) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=12)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=16) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -1090,30 +1091,34 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=24)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=28) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=30)*/ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=32) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=34) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=36) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=40) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -1124,74 +1129,77 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=50)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=55) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Channel (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=59) */ \ 0x00000000 /* ChangeChannel */, \ 0x00000002 /* ChangeChannelByNumber */, \ 0x00000003 /* SkipChannel */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=63)*/ \ 0x00000001 /* ChangeChannelResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Target Navigator (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=65) */ \ 0x00000000 /* NavigateTarget */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=67)*/ \ 0x00000001 /* NavigateTargetResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Media Input (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=69) */ \ 0x00000000 /* SelectInput */, \ 0x00000001 /* ShowInputStatus */, \ 0x00000002 /* HideInputStatus */, \ 0x00000003 /* RenameInput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Low Power (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=74) */ \ 0x00000000 /* Sleep */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Keypad Input (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=76) */ \ 0x00000000 /* SendKey */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=78)*/ \ + 0x00000001 /* SendKeyResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Content Launcher (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=80) */ \ 0x00000000 /* LaunchContent */, \ 0x00000001 /* LaunchURL */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=83)*/ \ 0x00000002 /* LaunchResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Application Launcher (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=85) */ \ 0x00000000 /* LaunchApp */, \ 0x00000001 /* StopApp */, \ 0x00000002 /* HideApp */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=89)*/ \ 0x00000003 /* LauncherResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=91) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Level Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=95) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1202,12 +1210,12 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Audio Output (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=104) */ \ 0x00000000 /* SelectOutput */, \ 0x00000001 /* RenameOutput */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 3, Cluster: Media Playback (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=107) */ \ 0x00000000 /* Play */, \ 0x00000001 /* Pause */, \ 0x00000002 /* StopPlayback */, \ @@ -1220,32 +1228,32 @@ 0x00000009 /* SkipBackward */, \ 0x0000000B /* Seek */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=119)*/ \ 0x0000000A /* PlaybackResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 3, Cluster: Content Launcher (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=121) */ \ 0x00000000 /* LaunchContent */, \ 0x00000001 /* LaunchURL */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=124)*/ \ 0x00000002 /* LaunchResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 3, Cluster: Account Login (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=126) */ \ 0x00000000 /* GetSetupPIN */, \ 0x00000002 /* Login */, \ 0x00000003 /* Logout */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=130)*/ \ 0x00000001 /* GetSetupPINResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 4, Cluster: Content Launcher (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=132) */ \ 0x00000000 /* LaunchContent */, \ 0x00000001 /* LaunchURL */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=135)*/ \ 0x00000002 /* LaunchResponse */, \ chip::kInvalidCommandId /* end of list */, \ } @@ -1397,8 +1405,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 24 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -1408,8 +1416,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 26 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1430,7 +1438,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1463,7 +1471,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 34 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1474,7 +1482,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1496,8 +1504,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 40 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ @@ -1551,7 +1559,7 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1584,8 +1592,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ @@ -1595,8 +1603,8 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 67 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Media Input (server) */ \ @@ -1606,7 +1614,7 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1617,7 +1625,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1628,8 +1636,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ @@ -1639,8 +1647,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 83 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ @@ -1650,8 +1658,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 83 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 85 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ @@ -1661,7 +1669,7 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 85 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 91 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1672,7 +1680,7 @@ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 95 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1694,7 +1702,7 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 98 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 104 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1716,8 +1724,8 @@ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 101 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 113 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 107 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 119 ) ,\ },\ { \ /* Endpoint: 3, Cluster: Content Launcher (server) */ \ @@ -1727,8 +1735,8 @@ .clusterSize = 10, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 115 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 118 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 121 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 124 ) ,\ },\ { \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ @@ -1749,8 +1757,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 120 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 124 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 126 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 130 ) ,\ },\ { \ /* Endpoint: 4, Cluster: Descriptor (server) */ \ @@ -1771,8 +1779,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 126 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 129 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 132 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 135 ) ,\ },\ { \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 903c257eb8cda7..8ee3bf0afd7aae 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -956,28 +956,29 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* QueryImage */, \ 0x00000002 /* ApplyUpdateRequest */, \ 0x00000004 /* NotifyUpdateApplied */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=4)*/ \ 0x00000001 /* QueryImageResponse */, \ 0x00000003 /* ApplyUpdateResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=7) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=12)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=16) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -985,30 +986,34 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=23)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=27) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ + /* GeneratedCommandList (index=29)*/ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=31) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=33) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=35) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=39) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -1019,22 +1024,22 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=49)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=54) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=57)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=59) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1042,14 +1047,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=66)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=71) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -1058,7 +1063,7 @@ 0x00000005 /* RecallScene */, \ 0x00000006 /* GetSceneMembership */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=79)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -1067,13 +1072,13 @@ 0x00000006 /* GetSceneMembershipResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=86) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=90) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -1084,28 +1089,21 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Barrier Control (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=99) */ \ 0x00000000 /* BarrierControlGoToPercent */, \ 0x00000001 /* BarrierControlStop */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: IAS Zone (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=102) */ \ 0x00000000 /* ZoneEnrollResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ - 0x00000000 /* ZoneStatusChangeNotification */, \ - 0x00000001 /* ZoneEnrollRequest */, \ - chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Test Cluster (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=104) */ \ 0x00000000 /* Test */, \ 0x00000001 /* TestNotHandled */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ - 0x00000000 /* TestSpecificResponse */, \ - chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=107) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -1226,8 +1224,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ @@ -1237,8 +1235,8 @@ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ - .generatedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1259,7 +1257,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1292,7 +1290,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1303,7 +1301,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1314,8 +1312,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ @@ -1358,8 +1356,8 @@ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 57 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ @@ -1369,8 +1367,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 62 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 66 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ @@ -1380,8 +1378,8 @@ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 67 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 75 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 71 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (client) */ \ @@ -1402,7 +1400,7 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1424,7 +1422,7 @@ .clusterSize = 23, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 90 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1501,7 +1499,7 @@ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 95 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 99 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1512,8 +1510,8 @@ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ .functions = chipFuncArrayIasZoneServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 98 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 100 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ) ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ @@ -1644,8 +1642,8 @@ .clusterSize = 1064, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 103 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 106 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 104 ) ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ @@ -1655,7 +1653,7 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 108 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 107 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index 62001fb7e0b3ec..4752a43bb63d19 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -896,21 +896,22 @@ // clang-format off #define GENERATED_COMMANDS { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* AnnounceOtaProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=2) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=6)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ + 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=10) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -918,30 +919,31 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=17)*/ \ 0x00000001 /* ScanNetworksResponse */, \ + 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=21) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=23) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=25) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=27) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=31) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -952,34 +954,34 @@ 0x0000000B /* AddTrustedRootCertificate */, \ 0x0000000C /* RemoveTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=41)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=46) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=51)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=54) */ \ 0x00000000 /* Identify */, \ 0x00000001 /* IdentifyQuery */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=58)*/ \ 0x00000000 /* IdentifyQueryResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=60) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -987,14 +989,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=67)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Window Covering (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=72) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -1004,7 +1006,7 @@ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Groups (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=80) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -1012,14 +1014,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ + /* GeneratedCommandList (index=87)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Window Covering (server) */\ - /* client_generated */ \ + /* AcceptedCommandList (index=92) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -1155,8 +1157,8 @@ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 9 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 10 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -1177,7 +1179,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1188,7 +1190,7 @@ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1210,7 +1212,7 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1221,7 +1223,7 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1232,8 +1234,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 31 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ @@ -1243,8 +1245,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 44 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ @@ -1276,8 +1278,8 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ @@ -1287,8 +1289,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 67 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (client) */ \ @@ -1320,7 +1322,7 @@ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 72 ) ,\ .generatedCommandList = nullptr ,\ },\ { \ @@ -1331,8 +1333,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ) ,\ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 85 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 80 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 87 ) ,\ },\ { \ /* Endpoint: 2, Cluster: Scenes (client) */ \ @@ -1364,7 +1366,7 @@ .clusterSize = 35, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 90 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 92 ) ,\ .generatedCommandList = nullptr ,\ },\ } From 46ae442fa2abdd5b308c247a095bb496a7806648 Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Tue, 10 May 2022 11:06:26 -0400 Subject: [PATCH 19/26] Enforce length constraints in access control (#17817) Add some APIs for length constraints. Use them in system module and in cluster to enforce length constraints. --- src/access/AccessControl.cpp | 58 +++ src/access/AccessControl.h | 83 ++-- .../examples/ExampleAccessControlDelegate.cpp | 18 + .../access-control-server.cpp | 37 +- .../suites/TestAccessControlCluster.yaml | 101 ++++ .../zap-generated/test/Commands.h | 442 +++++++++++++++++- .../chip-tool/zap-generated/test/Commands.h | 351 +++++++++++++- 7 files changed, 998 insertions(+), 92 deletions(-) diff --git a/src/access/AccessControl.cpp b/src/access/AccessControl.cpp index 58dbe29bb995c2..58789ccaa9115d 100644 --- a/src/access/AccessControl.cpp +++ b/src/access/AccessControl.cpp @@ -193,6 +193,64 @@ CHIP_ERROR AccessControl::Finish() return retval; } +CHIP_ERROR AccessControl::CreateEntry(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t * index, + const Entry & entry) +{ + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + + size_t count = 0; + size_t maxCount = 0; + ReturnErrorOnFailure(mDelegate->GetEntryCount(fabric, count)); + ReturnErrorOnFailure(mDelegate->GetMaxEntriesPerFabric(maxCount)); + + VerifyOrReturnError((count + 1) <= maxCount, CHIP_ERROR_BUFFER_TOO_SMALL); + + ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); + + size_t i = 0; + ReturnErrorOnFailure(mDelegate->CreateEntry(&i, entry, &fabric)); + + if (index) + { + *index = i; + } + + NotifyEntryChanged(subjectDescriptor, fabric, i, &entry, EntryListener::ChangeType::kAdded); + return CHIP_NO_ERROR; +} + +CHIP_ERROR AccessControl::UpdateEntry(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t index, + const Entry & entry) +{ + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(mDelegate->UpdateEntry(index, entry, &fabric)); + NotifyEntryChanged(subjectDescriptor, fabric, index, &entry, EntryListener::ChangeType::kUpdated); + return CHIP_NO_ERROR; +} + +CHIP_ERROR AccessControl::DeleteEntry(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t index) +{ + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + Entry entry; + Entry * p = nullptr; + if (mEntryListener != nullptr && ReadEntry(fabric, index, entry) == CHIP_NO_ERROR) + { + p = &entry; + } + ReturnErrorOnFailure(mDelegate->DeleteEntry(index, &fabric)); + if (p && p->HasDefaultDelegate()) + { + // The entry was read prior to deletion so its latest value could be provided + // to the listener after deletion. If it's been reset to its default delegate, + // that best effort attempt to retain the latest value failed. This is + // regrettable but OK. + p = nullptr; + } + NotifyEntryChanged(subjectDescriptor, fabric, index, p, EntryListener::ChangeType::kRemoved); + return CHIP_NO_ERROR; +} + void AccessControl::AddEntryListener(EntryListener & listener) { if (mEntryListener == nullptr) diff --git a/src/access/AccessControl.h b/src/access/AccessControl.h index ca76c4eaba0b6d..6f5836826fa277 100644 --- a/src/access/AccessControl.h +++ b/src/access/AccessControl.h @@ -345,13 +345,29 @@ class AccessControl virtual CHIP_ERROR Finish() { return CHIP_NO_ERROR; } // Capabilities - virtual CHIP_ERROR GetMaxEntryCount(size_t & value) const + virtual CHIP_ERROR GetMaxEntriesPerFabric(size_t & value) const + { + value = 0; + return CHIP_NO_ERROR; + } + + virtual CHIP_ERROR GetMaxSubjectsPerEntry(size_t & value) const { value = 0; return CHIP_NO_ERROR; } - // TODO: add more capabilities + virtual CHIP_ERROR GetMaxTargetsPerEntry(size_t & value) const + { + value = 0; + return CHIP_NO_ERROR; + } + + virtual CHIP_ERROR GetMaxEntryCount(size_t & value) const + { + value = 0; + return CHIP_NO_ERROR; + } // Actualities virtual CHIP_ERROR GetEntryCount(FabricIndex fabric, size_t & value) const @@ -417,6 +433,24 @@ class AccessControl CHIP_ERROR Finish(); // Capabilities + CHIP_ERROR GetMaxEntriesPerFabric(size_t & value) const + { + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->GetMaxEntriesPerFabric(value); + } + + CHIP_ERROR GetMaxSubjectsPerEntry(size_t & value) const + { + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->GetMaxSubjectsPerEntry(value); + } + + CHIP_ERROR GetMaxTargetsPerEntry(size_t & value) const + { + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->GetMaxTargetsPerEntry(value); + } + CHIP_ERROR GetMaxEntryCount(size_t & value) const { VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); @@ -457,19 +491,7 @@ class AccessControl * @param [out] index (If not nullptr) index of created entry (relative to fabric). * @param [in] entry Entry from which created entry is copied. */ - CHIP_ERROR CreateEntry(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t * index, const Entry & entry) - { - VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); - size_t i; - ReturnErrorOnFailure(mDelegate->CreateEntry(&i, entry, &fabric)); - if (index) - { - *index = i; - } - NotifyEntryChanged(subjectDescriptor, fabric, i, &entry, EntryListener::ChangeType::kAdded); - return CHIP_NO_ERROR; - } + CHIP_ERROR CreateEntry(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t * index, const Entry & entry); /** * Creates an entry in the access control list. @@ -519,14 +541,7 @@ class AccessControl * @param [in] index Index of entry to update (relative to fabric). * @param [in] entry Entry from which updated entry is copied. */ - CHIP_ERROR UpdateEntry(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t index, const Entry & entry) - { - VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); - ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(mDelegate->UpdateEntry(index, entry, &fabric)); - NotifyEntryChanged(subjectDescriptor, fabric, index, &entry, EntryListener::ChangeType::kUpdated); - return CHIP_NO_ERROR; - } + CHIP_ERROR UpdateEntry(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t index, const Entry & entry); /** * Updates an entry in the access control list. @@ -549,27 +564,7 @@ class AccessControl * @param [in] fabric Index of fabric in which to delete entry. * @param [in] index Index of entry to delete (relative to fabric). */ - CHIP_ERROR DeleteEntry(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t index) - { - VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); - Entry entry; - Entry * p = nullptr; - if (mEntryListener != nullptr && ReadEntry(fabric, index, entry) == CHIP_NO_ERROR) - { - p = &entry; - } - ReturnErrorOnFailure(mDelegate->DeleteEntry(index, &fabric)); - if (p && p->HasDefaultDelegate()) - { - // The entry was read prior to deletion so its latest value could be provided - // to the listener after deletion. If it's been reset to its default delegate, - // that best effort attempt to retain the latest value failed. This is - // regretable but OK. - p = nullptr; - } - NotifyEntryChanged(subjectDescriptor, fabric, index, p, EntryListener::ChangeType::kRemoved); - return CHIP_NO_ERROR; - } + CHIP_ERROR DeleteEntry(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t index); /** * Deletes an entry from the access control list. diff --git a/src/access/examples/ExampleAccessControlDelegate.cpp b/src/access/examples/ExampleAccessControlDelegate.cpp index 866c7d65beb84d..d56d96be0cbfd5 100644 --- a/src/access/examples/ExampleAccessControlDelegate.cpp +++ b/src/access/examples/ExampleAccessControlDelegate.cpp @@ -971,6 +971,24 @@ class AccessControlDelegate : public AccessControl::Delegate return CHIP_NO_ERROR; } + CHIP_ERROR GetMaxEntriesPerFabric(size_t & value) const override + { + value = EntryStorage::kEntriesPerFabric; + return CHIP_NO_ERROR; + } + + CHIP_ERROR GetMaxSubjectsPerEntry(size_t & value) const override + { + value = EntryStorage::kMaxSubjects; + return CHIP_NO_ERROR; + } + + CHIP_ERROR GetMaxTargetsPerEntry(size_t & value) const override + { + value = EntryStorage::kMaxTargets; + return CHIP_NO_ERROR; + } + CHIP_ERROR GetMaxEntryCount(size_t & value) const override { value = ArraySize(EntryStorage::acl); diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index a9a953085c4145..33ddd2979a3a2a 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -104,20 +104,20 @@ CHIP_ERROR AccessControlAttribute::Read(const ConcreteReadAttributePath & aPath, return ReadAcl(aEncoder); case AccessControlCluster::Attributes::Extension::Id: return ReadExtension(aEncoder); - // TODO(#14455): use API to get actual capabilities case AccessControlCluster::Attributes::SubjectsPerAccessControlEntry::Id: { - uint16_t value = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_SUBJECTS_PER_ENTRY; - return aEncoder.Encode(value); + size_t value = 0; + ReturnErrorOnFailure(GetAccessControl().GetMaxSubjectsPerEntry(value)); + return aEncoder.Encode(static_cast(value)); } - // TODO(#14455): use API to get actual capabilities case AccessControlCluster::Attributes::TargetsPerAccessControlEntry::Id: { - uint16_t value = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_TARGETS_PER_ENTRY; - return aEncoder.Encode(value); + size_t value = 0; + ReturnErrorOnFailure(GetAccessControl().GetMaxTargetsPerEntry(value)); + return aEncoder.Encode(static_cast(value)); } - // TODO(#14455): use API to get actual capabilities case AccessControlCluster::Attributes::AccessControlEntriesPerFabric::Id: { - uint16_t value = CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_MAX_ENTRIES_PER_FABRIC; - return aEncoder.Encode(value); + size_t value = 0; + ReturnErrorOnFailure(GetAccessControl().GetMaxEntriesPerFabric(value)); + return aEncoder.Encode(static_cast(value)); } case AccessControlCluster::Attributes::ClusterRevision::Id: return aEncoder.Encode(kClusterRevision); @@ -193,23 +193,20 @@ CHIP_ERROR AccessControlAttribute::WriteAcl(const ConcreteDataAttributePath & aP { FabricIndex accessingFabricIndex = aDecoder.AccessingFabricIndex(); + size_t oldCount; + ReturnErrorOnFailure(GetAccessControl().GetEntryCount(accessingFabricIndex, oldCount)); + size_t maxCount; + ReturnErrorOnFailure(GetAccessControl().GetMaxEntriesPerFabric(maxCount)); + if (!aPath.IsListItemOperation()) { DataModel::DecodableList list; ReturnErrorOnFailure(aDecoder.Decode(list)); - size_t allCount; - size_t oldCount; size_t newCount; - size_t maxCount; - - ReturnErrorOnFailure(GetAccessControl().GetEntryCount(allCount)); - ReturnErrorOnFailure(GetAccessControl().GetEntryCount(accessingFabricIndex, oldCount)); ReturnErrorOnFailure(list.ComputeSize(&newCount)); - ReturnErrorOnFailure(GetAccessControl().GetMaxEntryCount(maxCount)); - VerifyOrReturnError(allCount >= oldCount, CHIP_ERROR_INTERNAL); - VerifyOrReturnError(static_cast(allCount - oldCount + newCount) <= maxCount, - CHIP_IM_GLOBAL_STATUS(ConstraintError)); + + VerifyOrReturnError(newCount <= maxCount, CHIP_IM_GLOBAL_STATUS(ResourceExhausted)); auto iterator = list.begin(); size_t i = 0; @@ -237,6 +234,8 @@ CHIP_ERROR AccessControlAttribute::WriteAcl(const ConcreteDataAttributePath & aP } else if (aPath.mListOp == ConcreteDataAttributePath::ListOperation::AppendItem) { + VerifyOrReturnError((oldCount + 1) <= maxCount, CHIP_IM_GLOBAL_STATUS(ResourceExhausted)); + AclStorage::DecodableEntry decodableEntry; ReturnErrorOnFailure(aDecoder.Decode(decodableEntry)); diff --git a/src/app/tests/suites/TestAccessControlCluster.yaml b/src/app/tests/suites/TestAccessControlCluster.yaml index b0373539ff1e54..86b2d9a8645cb1 100644 --- a/src/app/tests/suites/TestAccessControlCluster.yaml +++ b/src/app/tests/suites/TestAccessControlCluster.yaml @@ -423,6 +423,107 @@ tests: }, ] + - label: "Write too many entries" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: [ + { + FabricIndex: 0, + Privilege: 5, # administer + AuthMode: 2, # case + Subjects: null, + Targets: + [ + { Cluster: null, Endpoint: 0, DeviceType: null }, + { Cluster: 1, Endpoint: null, DeviceType: null }, + { Cluster: 2, Endpoint: 3, DeviceType: null }, + ], + }, + { + FabricIndex: 0, + Privilege: 1, # view + AuthMode: 2, # case + Subjects: [4, 5, 6, 7], + Targets: + [ + { Cluster: null, Endpoint: 8, DeviceType: null }, + { Cluster: 9, Endpoint: null, DeviceType: null }, + { Cluster: 10, Endpoint: 11, DeviceType: null }, + ], + }, + { + FabricIndex: 0, + Privilege: 3, # operate + AuthMode: 3, # group + Subjects: [12, 13, 14, 15], + Targets: + [ + { Cluster: null, Endpoint: 16, DeviceType: null }, + { Cluster: 17, Endpoint: null, DeviceType: null }, + { Cluster: 18, Endpoint: 19, DeviceType: null }, + ], + }, + { + FabricIndex: 0, + Privilege: 1, # view + AuthMode: 2, # case + Subjects: [20, 21, 22, 23], + Targets: + [ + { Cluster: null, Endpoint: 24, DeviceType: null }, + { Cluster: 25, Endpoint: null, DeviceType: null }, + { Cluster: 26, Endpoint: 27, DeviceType: null }, + ], + }, + ] + response: + error: RESOURCE_EXHAUSTED + + - label: "Verify" + command: "readAttribute" + attribute: "ACL" + response: + value: [ + { + FabricIndex: 1, + Privilege: 5, # administer + AuthMode: 2, # case + Subjects: null, + Targets: + [ + { Cluster: null, Endpoint: 0, DeviceType: null }, + { Cluster: 1, Endpoint: null, DeviceType: null }, + { Cluster: 2, Endpoint: 3, DeviceType: null }, + ], + }, + { + FabricIndex: 1, + Privilege: 1, # view + AuthMode: 2, # case + Subjects: [4, 5, 6, 7], + Targets: + [ + { Cluster: null, Endpoint: 8, DeviceType: null }, + { Cluster: 9, Endpoint: null, DeviceType: null }, + { Cluster: 10, Endpoint: 11, DeviceType: null }, + ], + }, + { + FabricIndex: 1, + Privilege: 3, # operate + AuthMode: 3, # group + Subjects: [12, 13, 14, 15], + Targets: + [ + { Cluster: null, Endpoint: 16, DeviceType: null }, + { Cluster: 17, Endpoint: null, DeviceType: null }, + { Cluster: 18, Endpoint: 19, DeviceType: null }, + ], + }, + ] + + # note missing last entry - label: "Restore ACL" command: "writeAttribute" attribute: "ACL" diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index 22950d5ec073ae..29bd28264b455e 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -339,24 +339,32 @@ class TestAccessControlCluster : public TestCommandBridge { err = TestVerify_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Restore ACL\n"); - err = TestRestoreAcl_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Write too many entries\n"); + err = TestWriteTooManyEntries_17(); break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Verify\n"); err = TestVerify_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Validate resource minima (SubjectsPerAccessControlEntry)\n"); - err = TestValidateResourceMinimaSubjectsPerAccessControlEntry_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Restore ACL\n"); + err = TestRestoreAcl_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Validate resource minima (TargetsPerAccessControlEntry)\n"); - err = TestValidateResourceMinimaTargetsPerAccessControlEntry_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Verify\n"); + err = TestVerify_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Validate resource minima (AccessControlEntriesPerFabric)\n"); - err = TestValidateResourceMinimaAccessControlEntriesPerFabric_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Validate resource minima (SubjectsPerAccessControlEntry)\n"); + err = TestValidateResourceMinimaSubjectsPerAccessControlEntry_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Validate resource minima (TargetsPerAccessControlEntry)\n"); + err = TestValidateResourceMinimaTargetsPerAccessControlEntry_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Validate resource minima (AccessControlEntriesPerFabric)\n"); + err = TestValidateResourceMinimaAccessControlEntriesPerFabric_23(); break; } @@ -421,7 +429,7 @@ class TestAccessControlCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -435,6 +443,12 @@ class TestAccessControlCluster : public TestCommandBridge { case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -448,7 +462,7 @@ class TestAccessControlCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 24; chip::Optional mNodeId; chip::Optional mCluster; @@ -1482,7 +1496,405 @@ class TestAccessControlCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRestoreAcl_17() + CHIP_ERROR TestWriteTooManyEntries_17() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[0]).cluster = nil; + ((CHIPAccessControlClusterTarget *) temp_3[0]).endpoint = [NSNumber numberWithUnsignedShort:0U]; + ((CHIPAccessControlClusterTarget *) temp_3[0]).deviceType = nil; + + temp_3[1] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[1]).cluster = [NSNumber numberWithUnsignedInt:1UL]; + ((CHIPAccessControlClusterTarget *) temp_3[1]).endpoint = nil; + ((CHIPAccessControlClusterTarget *) temp_3[1]).deviceType = nil; + + temp_3[2] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).cluster = [NSNumber numberWithUnsignedInt:2UL]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:3U]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).deviceType = nil; + + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = temp_3; + } + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + + temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:4ULL]; + temp_3[1] = [NSNumber numberWithUnsignedLongLong:5ULL]; + temp_3[2] = [NSNumber numberWithUnsignedLongLong:6ULL]; + temp_3[3] = [NSNumber numberWithUnsignedLongLong:7ULL]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; + } + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[0]).cluster = nil; + ((CHIPAccessControlClusterTarget *) temp_3[0]).endpoint = [NSNumber numberWithUnsignedShort:8U]; + ((CHIPAccessControlClusterTarget *) temp_3[0]).deviceType = nil; + + temp_3[1] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[1]).cluster = [NSNumber numberWithUnsignedInt:9UL]; + ((CHIPAccessControlClusterTarget *) temp_3[1]).endpoint = nil; + ((CHIPAccessControlClusterTarget *) temp_3[1]).deviceType = nil; + + temp_3[2] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).cluster = [NSNumber numberWithUnsignedInt:10UL]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:11U]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).deviceType = nil; + + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + } + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + + temp_0[2] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).privilege = [NSNumber numberWithUnsignedChar:3]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).authMode = [NSNumber numberWithUnsignedChar:3]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:12ULL]; + temp_3[1] = [NSNumber numberWithUnsignedLongLong:13ULL]; + temp_3[2] = [NSNumber numberWithUnsignedLongLong:14ULL]; + temp_3[3] = [NSNumber numberWithUnsignedLongLong:15ULL]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).subjects = temp_3; + } + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[0]).cluster = nil; + ((CHIPAccessControlClusterTarget *) temp_3[0]).endpoint = [NSNumber numberWithUnsignedShort:16U]; + ((CHIPAccessControlClusterTarget *) temp_3[0]).deviceType = nil; + + temp_3[1] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[1]).cluster = [NSNumber numberWithUnsignedInt:17UL]; + ((CHIPAccessControlClusterTarget *) temp_3[1]).endpoint = nil; + ((CHIPAccessControlClusterTarget *) temp_3[1]).deviceType = nil; + + temp_3[2] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).cluster = [NSNumber numberWithUnsignedInt:18UL]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:19U]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).deviceType = nil; + + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).targets = temp_3; + } + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + + temp_0[3] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).privilege = [NSNumber numberWithUnsignedChar:1]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).authMode = [NSNumber numberWithUnsignedChar:2]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:20ULL]; + temp_3[1] = [NSNumber numberWithUnsignedLongLong:21ULL]; + temp_3[2] = [NSNumber numberWithUnsignedLongLong:22ULL]; + temp_3[3] = [NSNumber numberWithUnsignedLongLong:23ULL]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).subjects = temp_3; + } + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[0]).cluster = nil; + ((CHIPAccessControlClusterTarget *) temp_3[0]).endpoint = [NSNumber numberWithUnsignedShort:24U]; + ((CHIPAccessControlClusterTarget *) temp_3[0]).deviceType = nil; + + temp_3[1] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[1]).cluster = [NSNumber numberWithUnsignedInt:25UL]; + ((CHIPAccessControlClusterTarget *) temp_3[1]).endpoint = nil; + ((CHIPAccessControlClusterTarget *) temp_3[1]).deviceType = nil; + + temp_3[2] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).cluster = [NSNumber numberWithUnsignedInt:26UL]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).endpoint = [NSNumber numberWithUnsignedShort:27U]; + ((CHIPAccessControlClusterTarget *) temp_3[2]).deviceType = nil; + + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).targets = temp_3; + } + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + + aclArgument = temp_0; + } + [cluster writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write too many entries Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerify_18() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + CHIPReadParams * params = [[CHIPReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster + readAttributeAclWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Verify Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue( + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + VerifyOrReturn(CheckValue( + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + VerifyOrReturn(CheckValueNull( + "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[0]) + .endpoint, + 0U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[1]) + .cluster, + 1UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[2]) + .cluster, + 2UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[2]) + .endpoint, + 3U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue( + "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + VerifyOrReturn(CheckValue( + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1)); + VerifyOrReturn(CheckValue( + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2)); + VerifyOrReturn(CheckValueNonNull( + "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); + VerifyOrReturn(CheckValue("Subjects", + [((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).subjects count], + static_cast(4))); + VerifyOrReturn( + CheckValue("", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[0], 4ULL)); + VerifyOrReturn( + CheckValue("", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[1], 5ULL)); + VerifyOrReturn( + CheckValue("", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[2], 6ULL)); + VerifyOrReturn( + CheckValue("", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).subjects[3], 7ULL)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[0]) + .endpoint, + 8U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[1]) + .cluster, + 9UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[2]) + .cluster, + 10UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[2]) + .endpoint, + 11U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue( + "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1)); + VerifyOrReturn(CheckValue( + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3)); + VerifyOrReturn(CheckValue( + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3)); + VerifyOrReturn(CheckValueNonNull( + "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).subjects)); + VerifyOrReturn(CheckValue("Subjects", + [((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).subjects count], + static_cast(4))); + VerifyOrReturn(CheckValue( + "", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[0], 12ULL)); + VerifyOrReturn(CheckValue( + "", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[1], 13ULL)); + VerifyOrReturn(CheckValue( + "", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[2], 14ULL)); + VerifyOrReturn(CheckValue( + "", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).subjects[3], 15ULL)); + VerifyOrReturn(CheckValueNonNull( + "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).targets)); + VerifyOrReturn(CheckValue("Targets", + [((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).targets count], + static_cast(3))); + VerifyOrReturn(CheckValueNull("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[0]) + .cluster)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[0]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[0]) + .endpoint, + 16U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[0]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[1]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[1]) + .cluster, + 17UL)); + VerifyOrReturn(CheckValueNull("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[1]) + .endpoint)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[1]) + .deviceType)); + VerifyOrReturn(CheckValueNonNull("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[2]) + .cluster)); + VerifyOrReturn(CheckValue("Cluster", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[2]) + .cluster, + 18UL)); + VerifyOrReturn(CheckValueNonNull("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[2]) + .endpoint)); + VerifyOrReturn(CheckValue("Endpoint", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[2]) + .endpoint, + 19U)); + VerifyOrReturn(CheckValueNull("DeviceType", + ((CHIPAccessControlClusterTarget *) ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]) + .targets[2]) + .deviceType)); + VerifyOrReturn(CheckValue( + "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRestoreAcl_19() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -1512,7 +1924,7 @@ class TestAccessControlCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestVerify_18() + CHIP_ERROR TestVerify_20() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -1547,7 +1959,7 @@ class TestAccessControlCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestValidateResourceMinimaSubjectsPerAccessControlEntry_19() + CHIP_ERROR TestValidateResourceMinimaSubjectsPerAccessControlEntry_21() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -1569,7 +1981,7 @@ class TestAccessControlCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestValidateResourceMinimaTargetsPerAccessControlEntry_20() + CHIP_ERROR TestValidateResourceMinimaTargetsPerAccessControlEntry_22() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -1591,7 +2003,7 @@ class TestAccessControlCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestValidateResourceMinimaAccessControlEntriesPerFabric_21() + CHIP_ERROR TestValidateResourceMinimaAccessControlEntriesPerFabric_23() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index a26b9023f8c767..54f6b7d2e28e27 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -496,7 +496,7 @@ class TestAccessControlClusterSuite : public TestCommand { public: TestAccessControlClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestAccessControlCluster", 22, credsIssuerConfig) + TestCommand("TestAccessControlCluster", 24, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -838,9 +838,160 @@ class TestAccessControlClusterSuite : public TestCommand } break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); break; case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); + VerifyOrReturn(CheckValueNonNull("acl[0].targets", iter_0.GetValue().targets)); + { + auto iter_NaN = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].targets.Value()", iter_NaN, 0)); + VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[0].cluster", iter_NaN.GetValue().cluster)); + VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[0].endpoint", iter_NaN.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[0].targets.Value()[0].endpoint.Value()", iter_NaN.GetValue().endpoint.Value(), 0U)); + VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[0].deviceType", iter_NaN.GetValue().deviceType)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].targets.Value()", iter_NaN, 1)); + VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[1].cluster", iter_NaN.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[0].targets.Value()[1].cluster.Value()", iter_NaN.GetValue().cluster.Value(), 1UL)); + VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[1].endpoint", iter_NaN.GetValue().endpoint)); + VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[1].deviceType", iter_NaN.GetValue().deviceType)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].targets.Value()", iter_NaN, 2)); + VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[2].cluster", iter_NaN.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[0].targets.Value()[2].cluster.Value()", iter_NaN.GetValue().cluster.Value(), 2UL)); + VerifyOrReturn(CheckValueNonNull("acl[0].targets.Value()[2].endpoint", iter_NaN.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[0].targets.Value()[2].endpoint.Value()", iter_NaN.GetValue().endpoint.Value(), 3U)); + VerifyOrReturn(CheckValueNull("acl[0].targets.Value()[2].deviceType", iter_NaN.GetValue().deviceType)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].targets.Value()", + iter_NaN, 3)); + } + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); + { + auto iter_NaN = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_NaN, 0)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_NaN.GetValue(), 4ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_NaN, 1)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[1]", iter_NaN.GetValue(), 5ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_NaN, 2)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[2]", iter_NaN.GetValue(), 6ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_NaN, 3)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[3]", iter_NaN.GetValue(), 7ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", + iter_NaN, 4)); + } + VerifyOrReturn(CheckValueNonNull("acl[1].targets", iter_0.GetValue().targets)); + { + auto iter_NaN = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].targets.Value()", iter_NaN, 0)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].cluster", iter_NaN.GetValue().cluster)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[0].endpoint", iter_NaN.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[0].endpoint.Value()", iter_NaN.GetValue().endpoint.Value(), 8U)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[0].deviceType", iter_NaN.GetValue().deviceType)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].targets.Value()", iter_NaN, 1)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[1].cluster", iter_NaN.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[1].cluster.Value()", iter_NaN.GetValue().cluster.Value(), 9UL)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[1].endpoint", iter_NaN.GetValue().endpoint)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[1].deviceType", iter_NaN.GetValue().deviceType)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].targets.Value()", iter_NaN, 2)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[2].cluster", iter_NaN.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[2].cluster.Value()", iter_NaN.GetValue().cluster.Value(), 10UL)); + VerifyOrReturn(CheckValueNonNull("acl[1].targets.Value()[2].endpoint", iter_NaN.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[1].targets.Value()[2].endpoint.Value()", iter_NaN.GetValue().endpoint.Value(), 11U)); + VerifyOrReturn(CheckValueNull("acl[1].targets.Value()[2].deviceType", iter_NaN.GetValue().deviceType)); + VerifyOrReturn(CheckNoMoreListItems("acl[1].targets.Value()", + iter_NaN, 3)); + } + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); + VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3)); + VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3)); + VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); + { + auto iter_NaN = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_NaN, 0)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[0]", iter_NaN.GetValue(), 12ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_NaN, 1)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[1]", iter_NaN.GetValue(), 13ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_NaN, 2)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[2]", iter_NaN.GetValue(), 14ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].subjects.Value()", iter_NaN, 3)); + VerifyOrReturn(CheckValue("acl[2].subjects.Value()[3]", iter_NaN.GetValue(), 15ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[2].subjects.Value()", + iter_NaN, 4)); + } + VerifyOrReturn(CheckValueNonNull("acl[2].targets", iter_0.GetValue().targets)); + { + auto iter_NaN = iter_0.GetValue().targets.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].targets.Value()", iter_NaN, 0)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].cluster", iter_NaN.GetValue().cluster)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[0].endpoint", iter_NaN.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[0].endpoint.Value()", iter_NaN.GetValue().endpoint.Value(), 16U)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[0].deviceType", iter_NaN.GetValue().deviceType)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].targets.Value()", iter_NaN, 1)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[1].cluster", iter_NaN.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[1].cluster.Value()", iter_NaN.GetValue().cluster.Value(), 17UL)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[1].endpoint", iter_NaN.GetValue().endpoint)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[1].deviceType", iter_NaN.GetValue().deviceType)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[2].targets.Value()", iter_NaN, 2)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[2].cluster", iter_NaN.GetValue().cluster)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[2].cluster.Value()", iter_NaN.GetValue().cluster.Value(), 18UL)); + VerifyOrReturn(CheckValueNonNull("acl[2].targets.Value()[2].endpoint", iter_NaN.GetValue().endpoint)); + VerifyOrReturn( + CheckValue("acl[2].targets.Value()[2].endpoint.Value()", iter_NaN.GetValue().endpoint.Value(), 19U)); + VerifyOrReturn(CheckValueNull("acl[2].targets.Value()[2].deviceType", iter_NaN.GetValue().deviceType)); + VerifyOrReturn(CheckNoMoreListItems("acl[2].targets.Value()", + iter_NaN, 3)); + } + VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); + } + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList @@ -858,7 +1009,7 @@ class TestAccessControlClusterSuite : public TestCommand } } break; - case 19: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -866,7 +1017,7 @@ class TestAccessControlClusterSuite : public TestCommand VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); } break; - case 20: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -874,7 +1025,7 @@ class TestAccessControlClusterSuite : public TestCommand VerifyOrReturn(CheckConstraintMinValue("value", value, 3U)); } break; - case 21: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -1405,22 +1556,170 @@ class TestAccessControlClusterSuite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id); } case 17: { - LogStep(17, "Restore ACL"); + LogStep(17, "Write too many entries"); ListFreer listFreer; chip::app::DataModel::List value; { - auto * listHolder_0 = new ListHolder(1); + auto * listHolder_0 = new ListHolder(4); listFreer.add(listHolder_0); listHolder_0->mList[0].privilege = static_cast(5); listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); - listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(3); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNull(); + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 0U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_3->mList[1].cluster.SetNonNull(); + listHolder_3->mList[1].cluster.Value() = 1UL; + listHolder_3->mList[1].endpoint.SetNull(); + listHolder_3->mList[1].deviceType.SetNull(); + + listHolder_3->mList[2].cluster.SetNonNull(); + listHolder_3->mList[2].cluster.Value() = 2UL; + listHolder_3->mList[2].endpoint.SetNonNull(); + listHolder_3->mList[2].endpoint.Value() = 3U; + listHolder_3->mList[2].deviceType.SetNull(); + + listHolder_0->mList[0].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 3); + } listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[1].privilege = static_cast(1); + listHolder_0->mList[1].authMode = static_cast(2); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 4ULL; + listHolder_3->mList[1] = 5ULL; + listHolder_3->mList[2] = 6ULL; + listHolder_3->mList[3] = 7ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[1].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(3); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNull(); + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 8U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_3->mList[1].cluster.SetNonNull(); + listHolder_3->mList[1].cluster.Value() = 9UL; + listHolder_3->mList[1].endpoint.SetNull(); + listHolder_3->mList[1].deviceType.SetNull(); + + listHolder_3->mList[2].cluster.SetNonNull(); + listHolder_3->mList[2].cluster.Value() = 10UL; + listHolder_3->mList[2].endpoint.SetNonNull(); + listHolder_3->mList[2].endpoint.Value() = 11U; + listHolder_3->mList[2].deviceType.SetNull(); + + listHolder_0->mList[1].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 3); + } + listHolder_0->mList[1].fabricIndex = 0; + + listHolder_0->mList[2].privilege = static_cast(3); + listHolder_0->mList[2].authMode = static_cast(3); + listHolder_0->mList[2].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 12ULL; + listHolder_3->mList[1] = 13ULL; + listHolder_3->mList[2] = 14ULL; + listHolder_3->mList[3] = 15ULL; + listHolder_0->mList[2].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[2].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(3); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNull(); + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 16U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_3->mList[1].cluster.SetNonNull(); + listHolder_3->mList[1].cluster.Value() = 17UL; + listHolder_3->mList[1].endpoint.SetNull(); + listHolder_3->mList[1].deviceType.SetNull(); + + listHolder_3->mList[2].cluster.SetNonNull(); + listHolder_3->mList[2].cluster.Value() = 18UL; + listHolder_3->mList[2].endpoint.SetNonNull(); + listHolder_3->mList[2].endpoint.Value() = 19U; + listHolder_3->mList[2].deviceType.SetNull(); + + listHolder_0->mList[2].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 3); + } + listHolder_0->mList[2].fabricIndex = 0; + + listHolder_0->mList[3].privilege = static_cast(1); + listHolder_0->mList[3].authMode = static_cast(2); + listHolder_0->mList[3].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(4); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 20ULL; + listHolder_3->mList[1] = 21ULL; + listHolder_3->mList[2] = 22ULL; + listHolder_3->mList[3] = 23ULL; + listHolder_0->mList[3].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 4); + } + listHolder_0->mList[3].targets.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(3); + listFreer.add(listHolder_3); + + listHolder_3->mList[0].cluster.SetNull(); + listHolder_3->mList[0].endpoint.SetNonNull(); + listHolder_3->mList[0].endpoint.Value() = 24U; + listHolder_3->mList[0].deviceType.SetNull(); + + listHolder_3->mList[1].cluster.SetNonNull(); + listHolder_3->mList[1].cluster.Value() = 25UL; + listHolder_3->mList[1].endpoint.SetNull(); + listHolder_3->mList[1].deviceType.SetNull(); + + listHolder_3->mList[2].cluster.SetNonNull(); + listHolder_3->mList[2].cluster.Value() = 26UL; + listHolder_3->mList[2].endpoint.SetNonNull(); + listHolder_3->mList[2].endpoint.Value() = 27U; + listHolder_3->mList[2].deviceType.SetNull(); + + listHolder_0->mList[3].targets.Value() = + chip::app::DataModel::List(listHolder_3->mList, + 3); + } + listHolder_0->mList[3].fabricIndex = 0; + value = chip::app::DataModel::List( - listHolder_0->mList, 1); + listHolder_0->mList, 4); } return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value); } @@ -1429,17 +1728,41 @@ class TestAccessControlClusterSuite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id); } case 19: { - LogStep(19, "Validate resource minima (SubjectsPerAccessControlEntry)"); + LogStep(19, "Restore ACL"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = static_cast(5); + listHolder_0->mList[0].authMode = static_cast(2); + listHolder_0->mList[0].subjects.SetNull(); + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = 0; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value); + } + case 20: { + LogStep(20, "Verify"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id); + } + case 21: { + LogStep(21, "Validate resource minima (SubjectsPerAccessControlEntry)"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::SubjectsPerAccessControlEntry::Id); } - case 20: { - LogStep(20, "Validate resource minima (TargetsPerAccessControlEntry)"); + case 22: { + LogStep(22, "Validate resource minima (TargetsPerAccessControlEntry)"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::TargetsPerAccessControlEntry::Id); } - case 21: { - LogStep(21, "Validate resource minima (AccessControlEntriesPerFabric)"); + case 23: { + LogStep(23, "Validate resource minima (AccessControlEntriesPerFabric)"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AccessControlEntriesPerFabric::Id); } From db4fd84b9035cf7d1cd35eba0145bd7754c92342 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 10 May 2022 11:39:19 -0400 Subject: [PATCH 20/26] Ignore what things are enabled (or not) in controller-clusters.zap (#18209) when doing YAML generation. The YAML codegen was only allowing attributes/commands that were enabled in controller-clusters.zap. It should just allow all known attributes/commands. --- .../common/simulated-clusters/SimulatedClusters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js b/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js index dd84003900edd1..e135c0dc020f77 100644 --- a/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js +++ b/src/app/zap-templates/common/simulated-clusters/SimulatedClusters.js @@ -60,7 +60,7 @@ function getSimulatedCluster(clusterName) function getClusters(context) { - return ensureClusters(context).getClusters().then(clusters => clusters.concat(SimulatedClusters).flat(1)); + return ensureClusters(context, true).getClusters().then(clusters => clusters.concat(SimulatedClusters).flat(1)); } function getCommands(context, clusterName) From 7aa0432e2f1219165a0eb21f541945b10a42cd70 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 10 May 2022 11:53:34 -0400 Subject: [PATCH 21/26] Remove attribute filter vestiges. (#18227) Attribute filters are not actually used anymore. --- src/app/OperationalDeviceProxy.h | 1 - src/app/util/attribute-filter.h | 53 -- .../templates/app/CHIPClientCallbacks.zapt | 2 - src/controller/CommissioneeDeviceProxy.h | 1 - .../zap-generated/CHIPClientCallbacks.h | 1 - .../zap-generated/CHIPClientCallbacks.h | 8 - .../zap-generated/CHIPClientCallbacks.h | 633 ------------------ .../zap-generated/CHIPClientCallbacks.h | 7 - .../zap-generated/CHIPClientCallbacks.h | 1 - .../zap-generated/CHIPClientCallbacks.h | 1 - .../zap-generated/CHIPClientCallbacks.h | 1 - .../zap-generated/CHIPClientCallbacks.h | 8 - .../zap-generated/CHIPClientCallbacks.h | 1 - .../app1/zap-generated/CHIPClientCallbacks.h | 94 --- .../app2/zap-generated/CHIPClientCallbacks.h | 94 --- .../zap-generated/CHIPClientCallbacks.h | 1 - .../zap-generated/CHIPClientCallbacks.h | 1 - .../zap-generated/CHIPClientCallbacks.h | 1 - .../zap-generated/CHIPClientCallbacks.h | 15 - .../zap-generated/CHIPClientCallbacks.h | 24 - .../zap-generated/CHIPClientCallbacks.h | 3 - 21 files changed, 951 deletions(-) delete mode 100644 src/app/util/attribute-filter.h diff --git a/src/app/OperationalDeviceProxy.h b/src/app/OperationalDeviceProxy.h index 6ab85815cab10c..2fc74d5038e5f1 100644 --- a/src/app/OperationalDeviceProxy.h +++ b/src/app/OperationalDeviceProxy.h @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/util/attribute-filter.h b/src/app/util/attribute-filter.h deleted file mode 100644 index 27fc18a8f619ba..00000000000000 --- a/src/app/util/attribute-filter.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * - * 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 -#include - -typedef void (*DefaultSuccessCallback)(void * context); -typedef void (*DefaultFailureCallback)(void * context, uint8_t status); - -/** - * BasicAttributeFilter accepts the actual type of onSuccess callback as template parameter. - * It will check whether the type of the TLV data is expected by onSuccess callback. - * If a non expected value received, onFailure callback will be called with EMBER_ZCL_STATUS_INVALID_VALUE. - */ -template -void BasicAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccess, - chip::Callback::Cancelable * onFailure) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - typename chip::FunctionTraits::template ArgType<1> value; - - if ((err = data->Get(value)) == CHIP_NO_ERROR) - { - chip::Callback::Callback * cb = chip::Callback::Callback::FromCancelable(onSuccess); - cb->mCall(cb->mContext, value); - } - else - { - ChipLogError(Zcl, "Failed to get value from TLV data for attribute reading response: %s", chip::ErrorStr(err)); - chip::Callback::Callback * cb = - chip::Callback::Callback::FromCancelable(onFailure); - cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); - } -} diff --git a/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt b/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt index 765cb27892d249..3cf8a28506f917 100644 --- a/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt +++ b/src/app/zap-templates/templates/app/CHIPClientCallbacks.zapt @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -18,7 +17,6 @@ {{#chip_client_clusters}} {{#chip_server_cluster_attributes}} {{#if isArray}} -void {{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase name}}ListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttributeCallback)(void * context, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true}} data); {{/if}} {{/chip_server_cluster_attributes}} diff --git a/src/controller/CommissioneeDeviceProxy.h b/src/controller/CommissioneeDeviceProxy.h index 859fbe5a05add3..34cbfe7aeeb6f3 100644 --- a/src/controller/CommissioneeDeviceProxy.h +++ b/src/controller/CommissioneeDeviceProxy.h @@ -28,7 +28,6 @@ #include #include -#include #include #include #include diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h index 7ce7f6e003bd31..4458f51745a59b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h index 8c6de4343606e1..8c19024e86dfdc 100644 --- a/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/bridge-app/zap-generated/CHIPClientCallbacks.h @@ -24,26 +24,18 @@ #include #include #include -#include #include #include #include #include // List specific responses -void AccessControlClusterAclListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlAclListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccessControlClusterExtensionListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlExtensionListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccessControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index 61b17744c97427..5114f1445d7ede 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -24,1134 +24,501 @@ #include #include #include -#include #include #include #include #include // List specific responses -void AccessControlClusterAclListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlAclListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccessControlClusterExtensionListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlExtensionListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccessControlClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccessControlClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccessControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccountLoginClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccountLoginGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccountLoginClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccountLoginAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccountLoginClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccountLoginAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void AdministratorCommissioningClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AdministratorCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AdministratorCommissioningClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AdministratorCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AdministratorCommissioningClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AdministratorCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationBasicClusterAllowedVendorListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicAllowedVendorListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationBasicClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationBasicClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationLauncherClusterCatalogListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationLauncherCatalogListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationLauncherClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationLauncherGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationLauncherClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationLauncherAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationLauncherClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationLauncherAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AudioOutputClusterOutputListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AudioOutputOutputListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AudioOutputClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AudioOutputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AudioOutputClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AudioOutputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AudioOutputClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AudioOutputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void BarrierControlClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BarrierControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BarrierControlClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BarrierControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BarrierControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BarrierControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BasicClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BasicGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void BasicClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BasicAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void BasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BasicAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void BinaryInputBasicClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BinaryInputBasicGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BinaryInputBasicClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BinaryInputBasicAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BinaryInputBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BinaryInputBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BindingClusterBindingListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BindingBindingListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BindingClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BindingGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void BindingClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BindingAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void BindingClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BindingAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void BooleanStateClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BooleanStateGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BooleanStateClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BooleanStateAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BooleanStateClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BooleanStateAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void BridgedActionsClusterActionListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BridgedActionsActionListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BridgedActionsClusterEndpointListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BridgedActionsEndpointListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BridgedActionsClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BridgedActionsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BridgedActionsClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BridgedActionsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BridgedActionsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BridgedActionsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BridgedDeviceBasicClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BridgedDeviceBasicGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BridgedDeviceBasicClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BridgedDeviceBasicAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void BridgedDeviceBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BridgedDeviceBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ChannelClusterChannelListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ChannelChannelListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ChannelClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ChannelGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ChannelClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ChannelAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ChannelClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ChannelAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ColorControlClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ColorControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ColorControlClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ColorControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ColorControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ColorControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterAcceptHeaderListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterDeviceListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorDeviceListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterServerListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorServerListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterClientListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorClientListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterPartsListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorPartsListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void DiagnosticLogsClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DiagnosticLogsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void DiagnosticLogsClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DiagnosticLogsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void DiagnosticLogsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DiagnosticLogsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void DoorLockClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DoorLockGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void DoorLockClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DoorLockAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void DoorLockClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DoorLockAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ElectricalMeasurementClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ElectricalMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ElectricalMeasurementClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ElectricalMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ElectricalMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ElectricalMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void EthernetNetworkDiagnosticsClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*EthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void EthernetNetworkDiagnosticsClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*EthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void EthernetNetworkDiagnosticsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*EthernetNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void FanControlClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*FanControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void FanControlClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*FanControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void FanControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*FanControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void FixedLabelClusterLabelListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*FixedLabelLabelListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void FixedLabelClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*FixedLabelGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void FixedLabelClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*FixedLabelAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void FixedLabelClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*FixedLabelAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void FlowMeasurementClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*FlowMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void FlowMeasurementClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*FlowMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void FlowMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*FlowMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralCommissioningClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralCommissioningClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralCommissioningClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralDiagnosticsClusterNetworkInterfacesListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralDiagnosticsNetworkInterfacesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::GeneralDiagnostics::Structs::NetworkInterfaceType::DecodableType> & data); -void GeneralDiagnosticsClusterActiveHardwareFaultsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralDiagnosticsActiveHardwareFaultsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralDiagnosticsClusterActiveRadioFaultsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralDiagnosticsActiveRadioFaultsListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void GeneralDiagnosticsClusterActiveNetworkFaultsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralDiagnosticsActiveNetworkFaultsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralDiagnosticsClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralDiagnosticsClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralDiagnosticsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GroupKeyManagementClusterGroupKeyMapListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GroupKeyManagementGroupKeyMapListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GroupKeyManagementClusterGroupTableListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GroupKeyManagementGroupTableListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GroupKeyManagementClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GroupKeyManagementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GroupKeyManagementClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GroupKeyManagementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GroupKeyManagementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GroupKeyManagementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GroupsClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GroupsGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void GroupsClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GroupsAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void GroupsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GroupsAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void IdentifyClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*IdentifyGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void IdentifyClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*IdentifyAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void IdentifyClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*IdentifyAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void IlluminanceMeasurementClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*IlluminanceMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void IlluminanceMeasurementClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*IlluminanceMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void IlluminanceMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*IlluminanceMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void KeypadInputClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*KeypadInputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void KeypadInputClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*KeypadInputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void KeypadInputClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*KeypadInputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void LevelControlClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*LevelControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void LevelControlClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*LevelControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void LevelControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*LevelControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void LocalizationConfigurationClusterSupportedLocalesListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*LocalizationConfigurationSupportedLocalesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void LocalizationConfigurationClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*LocalizationConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void LocalizationConfigurationClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*LocalizationConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void LowPowerClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*LowPowerGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void LowPowerClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*LowPowerAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void LowPowerClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*LowPowerAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void MediaInputClusterInputListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*MediaInputInputListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void MediaInputClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*MediaInputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void MediaInputClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*MediaInputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void MediaInputClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*MediaInputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void MediaPlaybackClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*MediaPlaybackGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void MediaPlaybackClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*MediaPlaybackAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void MediaPlaybackClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*MediaPlaybackAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterSupportedModesListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectSupportedModesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void NetworkCommissioningClusterNetworksListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*NetworkCommissioningNetworksListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void NetworkCommissioningClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*NetworkCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void NetworkCommissioningClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*NetworkCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OtaSoftwareUpdateProviderClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OtaSoftwareUpdateProviderAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OtaSoftwareUpdateRequestorClusterDefaultOtaProvidersListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OtaSoftwareUpdateRequestorDefaultOtaProvidersListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & data); -void OtaSoftwareUpdateRequestorClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OtaSoftwareUpdateRequestorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OccupancySensingClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OccupancySensingGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OccupancySensingClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OccupancySensingAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OccupancySensingClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OccupancySensingAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OnOffClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OnOffGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void OnOffClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OnOffAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void OnOffClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OnOffAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void OnOffSwitchConfigurationClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OnOffSwitchConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OnOffSwitchConfigurationClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OnOffSwitchConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OnOffSwitchConfigurationClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OnOffSwitchConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OperationalCredentialsClusterNOCsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsNOCsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OperationalCredentialsClusterFabricsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsFabricsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & data); -void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OperationalCredentialsClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OperationalCredentialsClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OperationalCredentialsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void PowerSourceClusterActiveWiredFaultsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceActiveWiredFaultsListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void PowerSourceClusterActiveBatteryFaultsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceActiveBatteryFaultsListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void PowerSourceClusterActiveBatteryChargeFaultsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceActiveBatteryChargeFaultsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void PowerSourceClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void PowerSourceClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void PowerSourceClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void PowerSourceConfigurationClusterSourcesListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceConfigurationSourcesListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void PowerSourceConfigurationClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void PowerSourceConfigurationClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void PowerSourceConfigurationClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PowerSourceConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void PressureMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PressureMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void PumpConfigurationAndControlClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PumpConfigurationAndControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void PumpConfigurationAndControlClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PumpConfigurationAndControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void PumpConfigurationAndControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*PumpConfigurationAndControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void RelativeHumidityMeasurementClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void RelativeHumidityMeasurementClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void RelativeHumidityMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*RelativeHumidityMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ScenesClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ScenesGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ScenesClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ScenesAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ScenesClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ScenesAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void SoftwareDiagnosticsClusterThreadMetricsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SoftwareDiagnosticsThreadMetricsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void SoftwareDiagnosticsClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SoftwareDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void SoftwareDiagnosticsClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SoftwareDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void SoftwareDiagnosticsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SoftwareDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void SwitchClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void SwitchClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void SwitchClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterTargetListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorTargetListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TemperatureMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TemperatureMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TestClusterClusterListInt8uListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterListInt8uListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void TestClusterClusterListOctetStringListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterListOctetStringListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void TestClusterClusterListStructOctetStringListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterListStructOctetStringListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TestClusterClusterListNullablesAndOptionalsStructListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterListNullablesAndOptionalsStructListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::TestCluster::Structs::NullablesAndOptionalsStruct::DecodableType> & data); -void TestClusterClusterListLongOctetStringListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterListLongOctetStringListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TestClusterClusterListFabricScopedListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterListFabricScopedListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TestClusterClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TestClusterClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TestClusterClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TestClusterAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ThermostatClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThermostatAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ThermostatUserInterfaceConfigurationClusterGeneratedCommandListListAttributeFilter( - chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThermostatUserInterfaceConfigurationClusterAcceptedCommandListListAttributeFilter( - chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThermostatUserInterfaceConfigurationClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThreadNetworkDiagnosticsClusterNeighborTableListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThreadNetworkDiagnosticsNeighborTableListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & data); -void ThreadNetworkDiagnosticsClusterRouteTableListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThreadNetworkDiagnosticsRouteTableListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThreadNetworkDiagnosticsClusterSecurityPolicyListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThreadNetworkDiagnosticsSecurityPolicyListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::ThreadNetworkDiagnostics::Structs::SecurityPolicy::DecodableType> & data); -void ThreadNetworkDiagnosticsClusterOperationalDatasetComponentsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & data); -void ThreadNetworkDiagnosticsClusterActiveNetworkFaultsListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThreadNetworkDiagnosticsClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThreadNetworkDiagnosticsClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThreadNetworkDiagnosticsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThreadNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TimeFormatLocalizationClusterSupportedCalendarTypesListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TimeFormatLocalizationSupportedCalendarTypesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TimeFormatLocalizationClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TimeFormatLocalizationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TimeFormatLocalizationClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TimeFormatLocalizationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void UnitLocalizationClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*UnitLocalizationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void UserLabelClusterLabelListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*UserLabelLabelListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void UserLabelClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*UserLabelGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void UserLabelClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*UserLabelAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void WakeOnLanClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*WakeOnLanGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void WakeOnLanClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*WakeOnLanAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void WakeOnLanClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*WakeOnLanAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void WiFiNetworkDiagnosticsClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*WiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void WiFiNetworkDiagnosticsClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*WiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void WiFiNetworkDiagnosticsClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*WiFiNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void WindowCoveringClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*WindowCoveringGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void WindowCoveringClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*WindowCoveringAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void WindowCoveringClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*WindowCoveringAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/light-switch-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/light-switch-app/zap-generated/CHIPClientCallbacks.h index d3a44b3873d3c8..766d5a228129a7 100644 --- a/zzz_generated/light-switch-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/light-switch-app/zap-generated/CHIPClientCallbacks.h @@ -24,22 +24,15 @@ #include #include #include -#include #include #include #include #include // List specific responses -void IdentifyClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*IdentifyAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void OnOffClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OnOffAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ScenesClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ScenesAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.h index 7ce7f6e003bd31..4458f51745a59b 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.h index 7ce7f6e003bd31..4458f51745a59b 100644 --- a/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/lock-app/zap-generated/CHIPClientCallbacks.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.h index 7ce7f6e003bd31..4458f51745a59b 100644 --- a/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/log-source-app/zap-generated/CHIPClientCallbacks.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h index 8c6de4343606e1..8c19024e86dfdc 100644 --- a/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/ota-provider-app/zap-generated/CHIPClientCallbacks.h @@ -24,26 +24,18 @@ #include #include #include -#include #include #include #include #include // List specific responses -void AccessControlClusterAclListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlAclListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccessControlClusterExtensionListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlExtensionListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void AccessControlClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AccessControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.h index 7ce7f6e003bd31..4458f51745a59b 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClientCallbacks.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h b/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h index a3e9f16908f69a..f362f436b94fc7 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h @@ -24,173 +24,79 @@ #include #include #include -#include #include #include #include #include // List specific responses -void ApplicationBasicClusterAllowedVendorListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicAllowedVendorListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationBasicClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationBasicClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterAcceptHeaderListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralCommissioningClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralCommissioningClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralCommissioningClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void KeypadInputClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*KeypadInputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void KeypadInputClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*KeypadInputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void KeypadInputClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*KeypadInputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterSupportedModesListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectSupportedModesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void OperationalCredentialsClusterFabricsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsFabricsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & data); -void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void RelativeHumidityMeasurementClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void RelativeHumidityMeasurementClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void RelativeHumidityMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*RelativeHumidityMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void SwitchClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void SwitchClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void SwitchClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterTargetListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorTargetListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThermostatUserInterfaceConfigurationClusterGeneratedCommandListListAttributeFilter( - chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThermostatUserInterfaceConfigurationClusterAcceptedCommandListListAttributeFilter( - chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThermostatUserInterfaceConfigurationClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h b/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h index a3e9f16908f69a..f362f436b94fc7 100644 --- a/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h @@ -24,173 +24,79 @@ #include #include #include -#include #include #include #include #include // List specific responses -void ApplicationBasicClusterAllowedVendorListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicAllowedVendorListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationBasicClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationBasicClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ApplicationBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterAcceptHeaderListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralCommissioningClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralCommissioningClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void GeneralCommissioningClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void KeypadInputClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*KeypadInputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void KeypadInputClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*KeypadInputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void KeypadInputClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*KeypadInputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterSupportedModesListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectSupportedModesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ModeSelectClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void OperationalCredentialsClusterFabricsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsFabricsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & data); -void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void RelativeHumidityMeasurementClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void RelativeHumidityMeasurementClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void RelativeHumidityMeasurementClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*RelativeHumidityMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void SwitchClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void SwitchClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void SwitchClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*SwitchAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterTargetListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorTargetListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterAcceptedCommandListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThermostatUserInterfaceConfigurationClusterGeneratedCommandListListAttributeFilter( - chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThermostatUserInterfaceConfigurationClusterAcceptedCommandListListAttributeFilter( - chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ThermostatUserInterfaceConfigurationClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.h index 7ce7f6e003bd31..4458f51745a59b 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/pump-app/zap-generated/CHIPClientCallbacks.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.h index 7ce7f6e003bd31..4458f51745a59b 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClientCallbacks.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.h b/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.h index 7ce7f6e003bd31..4458f51745a59b 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/thermostat/zap-generated/CHIPClientCallbacks.h @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h index 984e885f8a37e1..266e7395ef9342 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h @@ -24,41 +24,26 @@ #include #include #include -#include #include #include #include #include // List specific responses -void BindingClusterBindingListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*BindingBindingListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void NetworkCommissioningClusterNetworksListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*NetworkCommissioningNetworksListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OperationalCredentialsClusterNOCsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsNOCsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void OperationalCredentialsClusterFabricsListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsFabricsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & data); -void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h index 91e0a3d72f8f48..ec7b36c00ae0bc 100644 --- a/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h @@ -24,58 +24,34 @@ #include #include #include -#include #include #include #include #include // List specific responses -void ApplicationLauncherClusterCatalogListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ApplicationLauncherCatalogListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void AudioOutputClusterOutputListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*AudioOutputOutputListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ChannelClusterChannelListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ChannelChannelListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void ContentLauncherClusterAcceptHeaderListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterDeviceListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorDeviceListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterServerListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorServerListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterClientListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorClientListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void DescriptorClusterPartsListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*DescriptorPartsListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -void MediaInputClusterInputListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*MediaInputInputListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -void TargetNavigatorClusterTargetListListAttributeFilter(chip::TLV::TLVReader * data, - chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*TargetNavigatorTargetListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.h index 8c331715b6fef3..348ae9d175f49e 100644 --- a/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/window-app/zap-generated/CHIPClientCallbacks.h @@ -24,14 +24,11 @@ #include #include #include -#include #include #include #include #include // List specific responses -void ScenesClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, - chip::Callback::Cancelable * onFailureCallback); typedef void (*ScenesAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); From 831211b64930949877f901d3a57690c6ea303471 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 10 May 2022 12:22:16 -0400 Subject: [PATCH 22/26] Validate existence of environment variables only at the time of usage instead of a global prerequisite for tizen (#18263) --- scripts/build/builders/tizen.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/scripts/build/builders/tizen.py b/scripts/build/builders/tizen.py index b3d3a7c88a06b1..8ca2847d9295ea 100644 --- a/scripts/build/builders/tizen.py +++ b/scripts/build/builders/tizen.py @@ -60,17 +60,6 @@ def __init__(self, root=os.path.join(root, 'examples', app.ExampleName(), 'linux'), runner=runner) - # Make sure that required ENV variables are defined - for env in ('TIZEN_SDK_ROOT', 'TIZEN_SDK_SYSROOT'): - if env not in os.environ: - raise Exception( - "Environment %s missing, cannot build Tizen target" % env) - - self.tizen_sdk_root = os.environ['TIZEN_SDK_ROOT'] - self.tizen_sdk_sysroot = os.environ['TIZEN_SDK_SYSROOT'] - self.tizen_sdk_cli = os.path.join( - self.tizen_sdk_root, "tools/ide/bin/tizen") - self.app = app self.board = board self.extra_gn_options = [] @@ -85,11 +74,17 @@ def __init__(self, raise Exception("TSAN sanitizer not supported by Tizen toolchain") def GnBuildArgs(self): + # Make sure that required ENV variables are defined + for env in ('TIZEN_SDK_ROOT', 'TIZEN_SDK_SYSROOT'): + if env not in os.environ: + raise Exception( + "Environment %s missing, cannot build Tizen target" % env) + return self.extra_gn_options + [ 'target_os="tizen"', 'target_cpu="%s"' % self.board.TargetCpuName(), - 'tizen_sdk_root="%s"' % self.tizen_sdk_root, - 'sysroot="%s"' % self.tizen_sdk_sysroot, + 'tizen_sdk_root="%s"' % os.environ['TIZEN_SDK_ROOT'], + 'sysroot="%s"' % os.environ['TIZEN_SDK_SYSROOT'], ] def build_outputs(self): From 395375d693eb4cde61fbf1c33a5259f1a36f263f Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 10 May 2022 09:28:58 -0700 Subject: [PATCH 23/26] =?UTF-8?q?Skip=20SetCurrentHeapHighWatermark=20if?= =?UTF-8?q?=20GetCurrentHeapUsed=20is=20not=20impleme=E2=80=A6=20(#18130)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Skip SetCurrentHeapHighWatermark if GetCurrentHeapUsed is not implemented * Address review comment --- .../software-diagnostics-server.cpp | 13 +++++----- src/include/platform/DiagnosticDataProvider.h | 6 +++++ .../Darwin/DiagnosticDataProviderImpl.cpp | 26 +++---------------- .../Darwin/DiagnosticDataProviderImpl.h | 5 +--- .../Linux/DiagnosticDataProviderImpl.cpp | 11 ++++++++ .../Linux/DiagnosticDataProviderImpl.h | 1 + 6 files changed, 29 insertions(+), 33 deletions(-) diff --git a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp index e73949f5b44870..5639622f99fe6d 100644 --- a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp +++ b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp @@ -156,14 +156,13 @@ bool emberAfSoftwareDiagnosticsClusterResetWatermarksCallback(app::CommandHandle { EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; - uint64_t currentHeapUsed; - CHIP_ERROR err = DeviceLayer::GetDiagnosticDataProvider().GetCurrentHeapUsed(currentHeapUsed); - VerifyOrExit(err == CHIP_NO_ERROR, status = EMBER_ZCL_STATUS_FAILURE); - - err = DeviceLayer::GetDiagnosticDataProvider().SetCurrentHeapHighWatermark(currentHeapUsed); - VerifyOrExit(err == CHIP_NO_ERROR, status = EMBER_ZCL_STATUS_FAILURE); + // If implemented, the server SHALL set the value of the CurrentHeapHighWatermark attribute to the + // value of the CurrentHeapUsed. + if (DeviceLayer::GetDiagnosticDataProvider().ResetWatermarks() != CHIP_NO_ERROR) + { + status = EMBER_ZCL_STATUS_FAILURE; + } -exit: emberAfSendImmediateDefaultResponse(status); return true; diff --git a/src/include/platform/DiagnosticDataProvider.h b/src/include/platform/DiagnosticDataProvider.h index acd169ead0a6fe..fa4165f2bc0dc1 100644 --- a/src/include/platform/DiagnosticDataProvider.h +++ b/src/include/platform/DiagnosticDataProvider.h @@ -180,6 +180,7 @@ class DiagnosticDataProvider virtual CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed); virtual CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark); virtual CHIP_ERROR SetCurrentHeapHighWatermark(uint64_t heapHighWatermark); + virtual CHIP_ERROR ResetWatermarks(); /* * Get the linked list of thread metrics of the current plaform. After usage, each caller of GetThreadMetrics @@ -272,6 +273,11 @@ inline CHIP_ERROR DiagnosticDataProvider::SetCurrentHeapHighWatermark(uint64_t h return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } +inline CHIP_ERROR DiagnosticDataProvider::ResetWatermarks() +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} + inline CHIP_ERROR DiagnosticDataProvider::GetThreadMetrics(ThreadMetrics ** threadMetricsOut) { return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; diff --git a/src/platform/Darwin/DiagnosticDataProviderImpl.cpp b/src/platform/Darwin/DiagnosticDataProviderImpl.cpp index 9b1085b03ca717..b45de23707b190 100644 --- a/src/platform/Darwin/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Darwin/DiagnosticDataProviderImpl.cpp @@ -68,30 +68,12 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetTotalOperationalHours(uint32_t & total return CHIP_ERROR_INVALID_TIME; } -CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapFree(uint64_t & currentHeapFree) +CHIP_ERROR DiagnosticDataProviderImpl::ResetWatermarks() { - // Overide with dummy value to pass CI - currentHeapFree = 0; - return CHIP_NO_ERROR; -} - -CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapUsed(uint64_t & currentHeapUsed) -{ - // Overide with dummy value to pass CI - currentHeapUsed = 0; - return CHIP_NO_ERROR; -} + // If implemented, the server SHALL set the value of the CurrentHeapHighWatermark attribute to the + // value of the CurrentHeapUsed. + // On Darwin, overide with non-op to pass CI. -CHIP_ERROR DiagnosticDataProviderImpl::GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) -{ - // Overide with dummy value to pass CI - currentHeapHighWatermark = 0; - return CHIP_NO_ERROR; -} - -CHIP_ERROR DiagnosticDataProviderImpl::SetCurrentHeapHighWatermark(uint64_t heapHighWatermark) -{ - // Overide to pass CI return CHIP_NO_ERROR; } diff --git a/src/platform/Darwin/DiagnosticDataProviderImpl.h b/src/platform/Darwin/DiagnosticDataProviderImpl.h index 21b6dfe2c8672e..7031fa7bd2a847 100644 --- a/src/platform/Darwin/DiagnosticDataProviderImpl.h +++ b/src/platform/Darwin/DiagnosticDataProviderImpl.h @@ -40,10 +40,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider CHIP_ERROR GetTotalOperationalHours(uint32_t & totalOperationalHours) override; // ===== Methods that implement the DiagnosticDataProvider abstract interface. - CHIP_ERROR GetCurrentHeapFree(uint64_t & currentHeapFree) override; - CHIP_ERROR GetCurrentHeapUsed(uint64_t & currentHeapUsed) override; - CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override; - CHIP_ERROR SetCurrentHeapHighWatermark(uint64_t heapHighWatermark) override; + CHIP_ERROR ResetWatermarks() override; }; } // namespace DeviceLayer diff --git a/src/platform/Linux/DiagnosticDataProviderImpl.cpp b/src/platform/Linux/DiagnosticDataProviderImpl.cpp index bc50595f8f00da..c97aeca2cb4833 100644 --- a/src/platform/Linux/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Linux/DiagnosticDataProviderImpl.cpp @@ -274,6 +274,17 @@ CHIP_ERROR DiagnosticDataProviderImpl::SetCurrentHeapHighWatermark(uint64_t heap 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. + + // On Linux, the write operation is non-op since we always rely on the mallinfo system + // function to get the current heap memory. + + return CHIP_NO_ERROR; +} + CHIP_ERROR DiagnosticDataProviderImpl::GetThreadMetrics(ThreadMetrics ** threadMetricsOut) { CHIP_ERROR err = CHIP_ERROR_READ_FAILED; diff --git a/src/platform/Linux/DiagnosticDataProviderImpl.h b/src/platform/Linux/DiagnosticDataProviderImpl.h index 8940cfacc0a5d7..d3797d63a9a175 100644 --- a/src/platform/Linux/DiagnosticDataProviderImpl.h +++ b/src/platform/Linux/DiagnosticDataProviderImpl.h @@ -44,6 +44,7 @@ class DiagnosticDataProviderImpl : public DiagnosticDataProvider CHIP_ERROR GetCurrentHeapHighWatermark(uint64_t & currentHeapHighWatermark) override; CHIP_ERROR GetThreadMetrics(ThreadMetrics ** threadMetricsOut) override; CHIP_ERROR SetCurrentHeapHighWatermark(uint64_t heapHighWatermark) override; + CHIP_ERROR ResetWatermarks() override; void ReleaseThreadMetrics(ThreadMetrics * threadMetrics) override; CHIP_ERROR GetRebootCount(uint16_t & rebootCount) override; From f503636e5aa9f9e108f6dee00458e39c855fa28c Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Tue, 10 May 2022 11:25:00 -0700 Subject: [PATCH 24/26] Fix OpenSSL Implementation of ValidateCertificateChain(). (#18125) In the OpenSSL Implementation of ValidateCertificateChain() function the intermediate ceritificate is loaded as a trusted certificate, which opens door to various security attacks. Updated implementation: now loading intermediate certificate as untrusted certificate part of cert chain. Added test case that would identify this issue in the previous implementation. --- src/crypto/CHIPCryptoPALOpenSSL.cpp | 9 +++++++-- src/crypto/tests/CHIPCryptoPALTest.cpp | 23 +++++++++++++++++------ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/crypto/CHIPCryptoPALOpenSSL.cpp b/src/crypto/CHIPCryptoPALOpenSSL.cpp index 8c59ffeae96ca7..b2ea8c3ef25274 100644 --- a/src/crypto/CHIPCryptoPALOpenSSL.cpp +++ b/src/crypto/CHIPCryptoPALOpenSSL.cpp @@ -1530,6 +1530,7 @@ CHIP_ERROR ValidateCertificateChain(const uint8_t * rootCertificate, size_t root int status = 0; X509_STORE_CTX * verifyCtx = nullptr; X509_STORE * store = nullptr; + STACK_OF(X509) * chain = nullptr; X509 * x509RootCertificate = nullptr; X509 * x509CACertificate = nullptr; X509 * x509LeafCertificate = nullptr; @@ -1549,6 +1550,9 @@ CHIP_ERROR ValidateCertificateChain(const uint8_t * rootCertificate, size_t root verifyCtx = X509_STORE_CTX_new(); VerifyOrExit(verifyCtx != nullptr, (result = CertificateChainValidationResult::kNoMemory, err = CHIP_ERROR_NO_MEMORY)); + chain = sk_X509_new_null(); + VerifyOrExit(chain != nullptr, (result = CertificateChainValidationResult::kNoMemory, err = CHIP_ERROR_NO_MEMORY)); + x509RootCertificate = d2i_X509(nullptr, &rootCertificate, static_cast(rootCertificateLen)); VerifyOrExit(x509RootCertificate != nullptr, (result = CertificateChainValidationResult::kRootFormatInvalid, err = CHIP_ERROR_INTERNAL)); @@ -1560,14 +1564,14 @@ CHIP_ERROR ValidateCertificateChain(const uint8_t * rootCertificate, size_t root VerifyOrExit(x509CACertificate != nullptr, (result = CertificateChainValidationResult::kICAFormatInvalid, err = CHIP_ERROR_INTERNAL)); - status = X509_STORE_add_cert(store, x509CACertificate); + status = sk_X509_push(chain, x509CACertificate); VerifyOrExit(status == 1, (result = CertificateChainValidationResult::kInternalFrameworkError, err = CHIP_ERROR_INTERNAL)); x509LeafCertificate = d2i_X509(nullptr, &leafCertificate, static_cast(leafCertificateLen)); VerifyOrExit(x509LeafCertificate != nullptr, (result = CertificateChainValidationResult::kLeafFormatInvalid, err = CHIP_ERROR_INTERNAL)); - status = X509_STORE_CTX_init(verifyCtx, store, x509LeafCertificate, nullptr); + status = X509_STORE_CTX_init(verifyCtx, store, x509LeafCertificate, chain); VerifyOrExit(status == 1, (result = CertificateChainValidationResult::kInternalFrameworkError, err = CHIP_ERROR_INTERNAL)); status = X509_verify_cert(verifyCtx); @@ -1580,6 +1584,7 @@ CHIP_ERROR ValidateCertificateChain(const uint8_t * rootCertificate, size_t root X509_free(x509LeafCertificate); X509_free(x509CACertificate); X509_free(x509RootCertificate); + sk_X509_free(chain); X509_STORE_CTX_free(verifyCtx); X509_STORE_free(store); diff --git a/src/crypto/tests/CHIPCryptoPALTest.cpp b/src/crypto/tests/CHIPCryptoPALTest.cpp index de70d7644f7cdb..588af82a6d545d 100644 --- a/src/crypto/tests/CHIPCryptoPALTest.cpp +++ b/src/crypto/tests/CHIPCryptoPALTest.cpp @@ -1901,6 +1901,23 @@ static void TestX509_CertChainValidation(nlTestSuite * inSuite, void * inContext leaf_cert.data(), leaf_cert.size(), chainValidationResult); NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_CERT_NOT_TRUSTED); NL_TEST_ASSERT(inSuite, chainValidationResult == CertificateChainValidationResult::kChainInvalid); + + // Now test with a Root certificate that does not correspond to the chain + ByteSpan wrong_root_cert; + err = GetTestCert(TestCert::kRoot02, TestCertLoadFlags::kDERForm, wrong_root_cert); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + err = ValidateCertificateChain(wrong_root_cert.data(), wrong_root_cert.size(), ica_cert.data(), ica_cert.size(), + leaf_cert.data(), leaf_cert.size(), chainValidationResult); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_CERT_NOT_TRUSTED); + NL_TEST_ASSERT(inSuite, chainValidationResult == CertificateChainValidationResult::kChainInvalid); + + // Now test with a Root certificate that does not correspond to the chain. + // Trying to validate ICA (as a leaf) which chains to Root - should fail bacause Root is loaded as untrusted intermediate cert. + err = ValidateCertificateChain(wrong_root_cert.data(), wrong_root_cert.size(), root_cert.data(), root_cert.size(), + ica_cert.data(), ica_cert.size(), chainValidationResult); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_CERT_NOT_TRUSTED); + NL_TEST_ASSERT(inSuite, chainValidationResult == CertificateChainValidationResult::kChainInvalid); } static void TestX509_IssuingTimestampValidation(nlTestSuite * inSuite, void * inContext) @@ -2138,15 +2155,12 @@ static void TestVIDPID_StringExtraction(nlTestSuite * inSuite, void * inContext) }; // clang-format on - int i = 1; for (const auto & testCase : kTestCases) { - fprintf(stderr, "DEBUG 01 i = %d\n", i); AttestationCertVidPid vidpid; AttestationCertVidPid vidpidFromCN; AttestationCertVidPid vidpidToCheck; CHIP_ERROR result = ExtractVIDPIDFromAttributeString(testCase.attrType, testCase.attr, vidpid, vidpidFromCN); - fprintf(stderr, "DEBUG 02 i = %d equal = %d\n", i++, (result == testCase.expectedResult)); NL_TEST_ASSERT(inSuite, result == testCase.expectedResult); if (testCase.attrType == DNAttrType::kMatterVID || testCase.attrType == DNAttrType::kMatterPID) @@ -2214,13 +2228,10 @@ static void TestVIDPID_x509Extraction(nlTestSuite * inSuite, void * inContext) { kOpCertNoVID, false, false, chip::VendorId::NotSpecified, 0x0000, CHIP_NO_ERROR }, }; - int i = 1; for (const auto & testCase : kTestCases) { - fprintf(stderr, "DEBUG 01 i = %d\n", i); AttestationCertVidPid vidpid; CHIP_ERROR result = ExtractVIDPIDFromX509Cert(testCase.cert, vidpid); - fprintf(stderr, "DEBUG 02 i = %d equal = %d\n", i++, (result == testCase.expectedResult)); NL_TEST_ASSERT(inSuite, result == testCase.expectedResult); NL_TEST_ASSERT(inSuite, vidpid.mVendorId.HasValue() == testCase.expectedVidPresent); NL_TEST_ASSERT(inSuite, vidpid.mProductId.HasValue() == testCase.expectedPidPresent); From 837b939afabb8d4d3b22b3349c200453695c1807 Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Tue, 10 May 2022 11:49:50 -0700 Subject: [PATCH 25/26] address media test case issues (#18158) * address media test case issues * address issue 17896 * address issue 17902 * address issue 17845 * attempt to fix test suites * Restyle address media test case issues (#18159) * Restyled by google-java-format * Restyled by clang-format * Restyled by prettier-markdown Co-authored-by: Restyled.io * address feedback, fix ACL persistence regression * fix typo * Restyled by prettier-markdown (#18215) Co-authored-by: Restyled.io * fix spelling * address feedback * address feedback * undo changes * Restyled by clang-format (#18231) Co-authored-by: Restyled.io * address feedback * Restyled by clang-format (#18254) Co-authored-by: Restyled.io * Update src/controller/CHIPDeviceControllerSystemState.h Co-authored-by: Boris Zbarsky Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky --- .github/.wordlist.txt | 1 + examples/platform/linux/AppMain.cpp | 6 ++++ examples/platform/linux/CommissionerMain.cpp | 5 +++ examples/tv-app/android/java/AppImpl.cpp | 12 ++++++- examples/tv-app/android/java/AppImpl.h | 11 +++--- .../android/java/ContentLauncherManager.cpp | 2 +- .../chip/tvapp/ContentLaunchManagerStub.java | 4 +++ examples/tv-app/linux/AppImpl.cpp | 12 ++++++- examples/tv-app/linux/AppImpl.h | 11 +++--- .../ContentLauncherManager.cpp | 16 +++++++++ .../tv-common/include/CHIPProjectAppConfig.h | 6 ++++ examples/tv-casting-app/linux/README.md | 35 +++++++++++-------- src/app/app-platform/ContentAppPlatform.cpp | 3 +- .../CHIPDeviceControllerFactory.cpp | 17 ++++++--- src/controller/CHIPDeviceControllerFactory.h | 1 + .../CHIPDeviceControllerSystemState.h | 8 ++++- 16 files changed, 115 insertions(+), 35 deletions(-) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index d73b4c2a109c90..9ad4eadcc4a478 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -1348,6 +1348,7 @@ UTF util utils UUID +ux VCP Vectorcall VendorID diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 08892c7afe4b2a..9a56e3c23ba453 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -109,6 +109,9 @@ void EventHandler(const DeviceLayer::ChipDeviceEvent * event, intptr_t arg) } } +// when the shell is enabled, don't intercept signals since it prevents the user from +// using expected commands like CTRL-C to quit the application. (see issue #17845) +#if !defined(ENABLE_CHIP_SHELL) void OnSignalHandler(int signum) { ChipLogDetail(DeviceLayer, "Caught signal %d", signum); @@ -159,6 +162,7 @@ void SetupSignalHandlers() signal(SIGIO, OnSignalHandler); signal(SIGINT, OnSignalHandler); } +#endif // !defined(ENABLE_CHIP_SHELL) void Cleanup() { @@ -364,7 +368,9 @@ void ChipLinuxAppMainLoop() #endif // defined(ENABLE_CHIP_SHELL) #endif // CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE +#if !defined(ENABLE_CHIP_SHELL) SetupSignalHandlers(); +#endif // !defined(ENABLE_CHIP_SHELL) ApplicationInit(); diff --git a/examples/platform/linux/CommissionerMain.cpp b/examples/platform/linux/CommissionerMain.cpp index e26e18b5ad1eb7..f7b6ae73650e72 100644 --- a/examples/platform/linux/CommissionerMain.cpp +++ b/examples/platform/linux/CommissionerMain.cpp @@ -22,6 +22,7 @@ #if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE #include +#include #include #include #include @@ -124,6 +125,7 @@ CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort) // use a different listen port for the commissioner than the default used by chip-tool. factoryParams.listenPort = commissionerPort; factoryParams.fabricIndependentStorage = &gServerStorage; + factoryParams.fabricTable = &Server::GetInstance().GetFabricTable(); gGroupDataProvider.SetStorageDelegate(&gServerStorage); ReturnErrorOnFailure(gGroupDataProvider.Init()); @@ -187,6 +189,9 @@ CHIP_ERROR InitCommissioner(uint16_t commissionerPort, uint16_t udcListenPort) gCommissionerDiscoveryController.SetUserDirectedCommissioningServer(gCommissioner.GetUserDirectedCommissioningServer()); gCommissionerDiscoveryController.SetCommissionerCallback(&gCommissionerCallback); + // advertise operational since we are an admin + app::DnssdServer::Instance().AdvertiseOperational(); + ChipLogProgress(Support, "InitCommissioner nodeId=0x" ChipLogFormatX64 " fabricIndex=%d", ChipLogValueX64(gCommissioner.GetNodeId()), fabricInfo->GetFabricIndex()); diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index cc7444ab0c1882..d4ddb18c049a8d 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -351,9 +351,19 @@ CHIP_ERROR ContentAppFactoryImpl::ConvertToPlatformCatalogVendorApp(const Catalo std::string appId(sourceApp.applicationId); if (appId == "applicationId") { - // test case passes "applicationId", map this to our test suite app + // regression test case passes "applicationId", map this to our test suite app Platform::CopyString(destinationApp->applicationId, sizeof(destinationApp->applicationId), "1111"); } + else if (appId == "exampleid") + { + // cert test case passes "exampleid", map this to our test suite app + Platform::CopyString(destinationApp->applicationId, sizeof(destinationApp->applicationId), "1"); + } + else if (appId == "exampleString") + { + // cert test case passes "exampleString", map this to our test suite app + Platform::CopyString(destinationApp->applicationId, sizeof(destinationApp->applicationId), "65521"); + } else { // for now, just return the applicationId passed in diff --git a/examples/tv-app/android/java/AppImpl.h b/examples/tv-app/android/java/AppImpl.h index db2f3340029cde..d7cb2b688db7ca 100644 --- a/examples/tv-app/android/java/AppImpl.h +++ b/examples/tv-app/android/java/AppImpl.h @@ -127,11 +127,12 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory CHIP_ERROR ConvertToPlatformCatalogVendorApp(const CatalogVendorApp & sourceApp, CatalogVendorApp * destinationApp) override; protected: - ContentAppImpl mContentApps[APP_LIBRARY_SIZE] = { ContentAppImpl("Vendor1", 1, "App1", 11, "Version1", "34567890"), - ContentAppImpl("Vendor2", 65521, "App2", 32768, "Version2", "20202021"), - ContentAppImpl("Vendor3", 9050, "App3", 22, "Version3", "20202021"), - ContentAppImpl("TestSuiteVendor", 1111, "applicationId", 22, "v2", - "20202021") }; + ContentAppImpl mContentApps[APP_LIBRARY_SIZE] = { + ContentAppImpl("Vendor1", 1, "exampleid", 11, "Version1", "34567890"), + ContentAppImpl("Vendor2", 65521, "exampleString", 32768, "Version2", "20202021"), + ContentAppImpl("Vendor3", 9050, "App3", 22, "Version3", "20202021"), + ContentAppImpl("TestSuiteVendor", 1111, "applicationId", 22, "v2", "20202021") + }; }; } // namespace AppPlatform diff --git a/examples/tv-app/android/java/ContentLauncherManager.cpp b/examples/tv-app/android/java/ContentLauncherManager.cpp index 78868abdbb68ae..cb5e8b968a50d1 100644 --- a/examples/tv-app/android/java/ContentLauncherManager.cpp +++ b/examples/tv-app/android/java/ContentLauncherManager.cpp @@ -106,7 +106,7 @@ void ContentLauncherManager::HandleLaunchUrl(CommandResponseHelperapplicationId, sizeof(destinationApp->applicationId), "1111"); } + else if (appId == "exampleid") + { + // cert test case passes "exampleid", map this to our test suite app + Platform::CopyString(destinationApp->applicationId, sizeof(destinationApp->applicationId), "1"); + } + else if (appId == "exampleString") + { + // cert test case passes "exampleString", map this to our test suite app + Platform::CopyString(destinationApp->applicationId, sizeof(destinationApp->applicationId), "65521"); + } else { // for now, just return the applicationId passed in diff --git a/examples/tv-app/linux/AppImpl.h b/examples/tv-app/linux/AppImpl.h index 709e1448da3019..a461ceac3e7c05 100644 --- a/examples/tv-app/linux/AppImpl.h +++ b/examples/tv-app/linux/AppImpl.h @@ -126,11 +126,12 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory CHIP_ERROR ConvertToPlatformCatalogVendorApp(const CatalogVendorApp & sourceApp, CatalogVendorApp * destinationApp) override; protected: - ContentAppImpl mContentApps[APP_LIBRARY_SIZE] = { ContentAppImpl("Vendor1", 1, "App1", 11, "Version1", "34567890"), - ContentAppImpl("Vendor2", 65521, "App2", 32768, "Version2", "20202021"), - ContentAppImpl("Vendor3", 9050, "App3", 22, "Version3", "20202021"), - ContentAppImpl("TestSuiteVendor", 1111, "applicationId", 22, "v2", - "20202021") }; + ContentAppImpl mContentApps[APP_LIBRARY_SIZE] = { + ContentAppImpl("Vendor1", 1, "exampleid", 11, "Version1", "34567890"), + ContentAppImpl("Vendor2", 65521, "exampleString", 32768, "Version2", "20202021"), + ContentAppImpl("Vendor3", 9050, "App3", 22, "Version3", "20202021"), + ContentAppImpl("TestSuiteVendor", 1111, "applicationId", 22, "v2", "20202021") + }; }; } // namespace AppPlatform diff --git a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp index cba64f0b73a38d..a0a0136c40fc18 100644 --- a/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp +++ b/examples/tv-app/linux/include/content-launcher/ContentLauncherManager.cpp @@ -51,11 +51,27 @@ void ContentLauncherManager::HandleLaunchUrl(CommandResponseHelper diff --git a/examples/tv-casting-app/linux/README.md b/examples/tv-casting-app/linux/README.md index 065f6f27e758ff..e821878d2668cd 100644 --- a/examples/tv-casting-app/linux/README.md +++ b/examples/tv-casting-app/linux/README.md @@ -42,7 +42,7 @@ commissioned. Then it allows the user to send CHIP commands to the TV. - Pre-requisite: Build and run the tv-app $ cd ~/connectedhomeip/examples/tv-app/linux - $ out/debug/chip-tv-app + $ out/debug/chip-tv-app --secured-device-port 5640 --secured-commissioner-port 5552 - Run the tv-casting-app (clean start) @@ -71,11 +71,16 @@ printed list. - Initiate UDC for the discovered video player with index 0 - > cast request 0 + tv-casting-app> cast request 0 + +- After sending UDC command to tv-app, you should be able to enter into tv-app + shell: + + tv-app> controller ux ok - Re-run commissioner discovery - > cast discover + tv-casting-app> cast discover ### Re-Running the Example on Linux with Cached Fabrics @@ -88,20 +93,20 @@ valid cached fabric will be used. - Print all shell commands - > help - > cast help + tv-casting-app> help + tv-casting-app> cast help - Print all fabrics - > cast print-fabrics + tv-casting-app> cast print-fabrics - Delete fabric with index 1 - > cast delete-fabric 1 + tv-casting-app> cast delete-fabric 1 -- Switch to fabric index +- Switch to fabric index - > cast set-fabric 1 + tv-casting-app> cast set-fabric 1 ### Sending Arbitrary Cluster commands @@ -116,9 +121,9 @@ the video player (TV). For convenience, when nodeId '0' is used, the tv-casting-app will use the cached nodeId for the video player corresponding to the current fabric. -The tv-casting-app is able to determine the nodeId for the given fabric by -checking its binding table since the video player sets bindings on the -tv-casting-app for each endpoint to which the tv-casting-app is granted access +The tv-casting-app is able to determine the nodeId for the given fabric by +checking its binding table since the video player sets bindings on the +tv-casting-app for each endpoint to which the tv-casting-app is granted access during commissioning. - Run the tv-casting-app and invoke a cluster command using default fabric, @@ -144,9 +149,9 @@ during commissioning. - Run the tv-casting-app and invoke a cluster command from the shell using default fabric, video player nodeId for that fabric - > cast cluster keypadinput send-key 1 0 1 + tv-casting-app> cast cluster keypadinput send-key 1 0 1 -- Run the tv-casting-app and invoke a cluster command from the shell using +- Run the tv-casting-app and invoke a cluster command from the shell using default fabric, target video player nodeId 0xFFFFFFEFFFFFFFFF - > cast cluster keypadinput send-key 1 0xFFFFFFEFFFFFFFFF 1 + tv-casting-app> cast cluster keypadinput send-key 1 0xFFFFFFEFFFFFFFFF 1 diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index bc9c6df7032fb4..73783d830297d3 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -506,7 +506,8 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(OperationalDeviceProxy * targe } } - ReturnErrorOnFailure(GetAccessControl().CreateEntry(nullptr, entry, nullptr)); + // TODO: add a subject description on the ACL + ReturnErrorOnFailure(GetAccessControl().CreateEntry(nullptr, targetDeviceProxy->GetFabricIndex(), nullptr, entry)); ChipLogProgress(Controller, "Attempting to update Binding list"); BindingListType bindingList(bindings.data(), bindings.size()); diff --git a/src/controller/CHIPDeviceControllerFactory.cpp b/src/controller/CHIPDeviceControllerFactory.cpp index b81e94e59483c0..f46d01cdad0e07 100644 --- a/src/controller/CHIPDeviceControllerFactory.cpp +++ b/src/controller/CHIPDeviceControllerFactory.cpp @@ -147,7 +147,6 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) #endif )); - stateParams.fabricTable = chip::Platform::New(); stateParams.sessionMgr = chip::Platform::New(); SimpleSessionResumptionStorage * sessionResumptionStorage = chip::Platform::New(); stateParams.sessionResumptionStorage = sessionResumptionStorage; @@ -155,7 +154,14 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) stateParams.messageCounterManager = chip::Platform::New(); stateParams.groupDataProvider = params.groupDataProvider; - ReturnErrorOnFailure(stateParams.fabricTable->Init(params.fabricIndependentStorage)); + // if no fabricTable was provided, create one and track it in stateParams for cleanup + FabricTable * tempFabricTable = nullptr; + stateParams.fabricTable = params.fabricTable; + if (stateParams.fabricTable == nullptr) + { + stateParams.fabricTable = tempFabricTable = chip::Platform::New(); + ReturnErrorOnFailure(stateParams.fabricTable->Init(params.fabricIndependentStorage)); + } ReturnErrorOnFailure(sessionResumptionStorage->Init(params.fabricIndependentStorage)); auto delegate = chip::Platform::MakeUnique(); @@ -234,6 +240,7 @@ CHIP_ERROR DeviceControllerFactory::InitSystemState(FactoryInitParams params) // store the system state mSystemState = chip::Platform::New(stateParams); + mSystemState->SetTempFabricTable(tempFabricTable); ChipLogDetail(Controller, "System State Initialized..."); return CHIP_NO_ERROR; } @@ -403,10 +410,10 @@ CHIP_ERROR DeviceControllerSystemState::Shutdown() mSessionMgr = nullptr; } - if (mFabrics != nullptr) + if (mTempFabricTable != nullptr) { - chip::Platform::Delete(mFabrics); - mFabrics = nullptr; + chip::Platform::Delete(mTempFabricTable); + mTempFabricTable = nullptr; } return CHIP_NO_ERROR; diff --git a/src/controller/CHIPDeviceControllerFactory.h b/src/controller/CHIPDeviceControllerFactory.h index d0ddfd0d314136..24eb450b6414a0 100644 --- a/src/controller/CHIPDeviceControllerFactory.h +++ b/src/controller/CHIPDeviceControllerFactory.h @@ -78,6 +78,7 @@ struct FactoryInitParams Credentials::GroupDataProvider * groupDataProvider = nullptr; Inet::EndPointManager * tcpEndPointManager = nullptr; Inet::EndPointManager * udpEndPointManager = nullptr; + FabricTable * fabricTable = nullptr; #if CONFIG_NETWORK_LAYER_BLE Ble::BleLayer * bleLayer = nullptr; #endif diff --git a/src/controller/CHIPDeviceControllerSystemState.h b/src/controller/CHIPDeviceControllerSystemState.h index 3dd963a2b6646f..f3c9efc6e90f70 100644 --- a/src/controller/CHIPDeviceControllerSystemState.h +++ b/src/controller/CHIPDeviceControllerSystemState.h @@ -74,6 +74,7 @@ struct DeviceControllerSystemStateParams System::Layer * systemLayer = nullptr; Inet::EndPointManager * tcpEndPointManager = nullptr; Inet::EndPointManager * udpEndPointManager = nullptr; + FabricTable * fabricTable = nullptr; #if CONFIG_NETWORK_LAYER_BLE Ble::BleLayer * bleLayer = nullptr; #endif @@ -86,7 +87,6 @@ struct DeviceControllerSystemStateParams SessionManager * sessionMgr = nullptr; Messaging::ExchangeManager * exchangeMgr = nullptr; secure_channel::MessageCounterManager * messageCounterManager = nullptr; - FabricTable * fabricTable = nullptr; CASEServer * caseServer = nullptr; CASESessionManager * caseSessionManager = nullptr; OperationalDevicePool * operationalDevicePool = nullptr; @@ -158,6 +158,7 @@ class DeviceControllerSystemState #endif CASESessionManager * CASESessionMgr() const { return mCASESessionManager; } Credentials::GroupDataProvider * GetGroupDataProvider() const { return mGroupDataProvider; } + void SetTempFabricTable(FabricTable * tempFabricTable) { mTempFabricTable = tempFabricTable; } private: DeviceControllerSystemState(){}; @@ -179,6 +180,11 @@ class DeviceControllerSystemState CASEClientPool * mCASEClientPool = nullptr; Credentials::GroupDataProvider * mGroupDataProvider = nullptr; + // If mTempFabricTable is not null, it was created during + // DeviceControllerFactory::InitSystemState and needs to be + // freed during shutdown + FabricTable * mTempFabricTable = nullptr; + std::atomic mRefCount{ 1 }; CHIP_ERROR Shutdown(); From 0ebbf5ee3d43b781a21f1380b4638e5bf765d144 Mon Sep 17 00:00:00 2001 From: Lukasz Duda Date: Mon, 9 May 2022 00:40:04 +0200 Subject: [PATCH 26/26] [linux] Make BLE connection retry on SW connection abort error Signed-off-by: Lukasz Duda --- src/platform/Linux/bluez/Helper.cpp | 44 ++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/src/platform/Linux/bluez/Helper.cpp b/src/platform/Linux/bluez/Helper.cpp index 81f59af086276c..14662980eda747 100644 --- a/src/platform/Linux/bluez/Helper.cpp +++ b/src/platform/Linux/bluez/Helper.cpp @@ -83,6 +83,8 @@ namespace chip { namespace DeviceLayer { namespace Internal { +constexpr uint16_t kMaxConnectRetries = 4; + static BluezConnection * GetBluezConnectionViaDevice(BluezEndpoint * apEndpoint); namespace { @@ -1735,25 +1737,48 @@ bool BluezUnsubscribeCharacteristic(BLE_CONNECTION_OBJECT apConn) struct ConnectParams { - ConnectParams(BluezDevice1 * device, BluezEndpoint * endpoint) : mDevice(device), mEndpoint(endpoint) {} + ConnectParams(BluezDevice1 * device, BluezEndpoint * endpoint) : mDevice(device), mEndpoint(endpoint), mNumRetries(0) {} BluezDevice1 * mDevice; BluezEndpoint * mEndpoint; + uint16_t mNumRetries; }; -static void ConnectDeviceDone(GObject * aObject, GAsyncResult * aResult, gpointer) +static void ConnectDeviceDone(GObject * aObject, GAsyncResult * aResult, gpointer apParams) { - BluezDevice1 * device = BLUEZ_DEVICE1(aObject); - GError * error = nullptr; - gboolean success = bluez_device1_call_connect_finish(device, aResult, &error); + BluezDevice1 * device = BLUEZ_DEVICE1(aObject); + GError * error = nullptr; + gboolean success = bluez_device1_call_connect_finish(device, aResult, &error); + ConnectParams * params = static_cast(apParams); + + assert(params != nullptr); if (!success) { - ChipLogError(DeviceLayer, "FAIL: ConnectDevice : %s", error->message); + ChipLogError(DeviceLayer, "FAIL: ConnectDevice : %s (%d)", error->message, error->code); + + // Due to radio interferences or Wi-Fi coexistence, sometimes the BLE connection may not be + // established (e.g. Connection Indication Packet is missed by BLE peripheral). In such case, + // BlueZ returns "Software caused connection abort error", and we should make a connection retry. + // It's important to make sure that the connection is correctly ceased, by calling `Disconnect()` + // D-Bus method, or else `Connect()` returns immediately without any effect. + if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR) && params->mNumRetries++ < kMaxConnectRetries) + { + // Clear the error before usage in subsequent call. + g_clear_error(&error); + + bluez_device1_call_disconnect_sync(device, nullptr, &error); + bluez_device1_call_connect(device, params->mEndpoint->mpConnectCancellable, ConnectDeviceDone, params); + ExitNow(); + } + BLEManagerImpl::HandleConnectFailed(CHIP_ERROR_INTERNAL); - ExitNow(); + } + else + { + ChipLogDetail(DeviceLayer, "ConnectDevice complete"); } - ChipLogDetail(DeviceLayer, "ConnectDevice complete"); + chip::Platform::Delete(params); exit: if (error != nullptr) @@ -1769,9 +1794,8 @@ static gboolean ConnectDeviceImpl(ConnectParams * apParams) assert(endpoint != nullptr); g_cancellable_reset(endpoint->mpConnectCancellable); - bluez_device1_call_connect(device, endpoint->mpConnectCancellable, ConnectDeviceDone, nullptr); + bluez_device1_call_connect(device, endpoint->mpConnectCancellable, ConnectDeviceDone, apParams); g_object_unref(device); - chip::Platform::Delete(apParams); return G_SOURCE_REMOVE; }